mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Merge pull request #59842 from nextcloud/fix/swallow-redirected-navigation
fix(files,files_sharing): swallow redirected navigation errors
This commit is contained in:
commit
96206dd183
6 changed files with 14 additions and 12 deletions
|
|
@ -38,13 +38,14 @@ Router.prototype.replace = (function(this: Router, ...args: Parameters<typeof or
|
|||
}) as typeof originalReplace
|
||||
|
||||
/**
|
||||
* Ignore duplicated-navigation error but forward real exceptions
|
||||
* Ignore duplicated- and redirected-navigation errors but forward real exceptions
|
||||
*
|
||||
* @param error The thrown error
|
||||
*/
|
||||
function ignoreDuplicateNavigation(error: unknown): void {
|
||||
if (isNavigationFailure(error, NavigationFailureType.duplicated)) {
|
||||
logger.debug('Ignoring duplicated navigation from vue-router', { error })
|
||||
if (isNavigationFailure(error, NavigationFailureType.duplicated)
|
||||
|| isNavigationFailure(error, NavigationFailureType.redirected)) {
|
||||
logger.debug('Ignoring duplicated/redirected navigation from vue-router', { error })
|
||||
} else {
|
||||
throw error
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,13 +34,14 @@ Router.prototype.replace = (function(this: Router, ...args: Parameters<typeof or
|
|||
}) as typeof originalReplace
|
||||
|
||||
/**
|
||||
* Ignore duplicated-navigation error but forward real exceptions
|
||||
* Ignore duplicated- and redirected-navigation errors but forward real exceptions
|
||||
*
|
||||
* @param error The thrown error
|
||||
*/
|
||||
function ignoreDuplicateNavigation(error: unknown): void {
|
||||
if (isNavigationFailure(error, NavigationFailureType.duplicated)) {
|
||||
logger.debug('Ignoring duplicated navigation from vue-router', { error })
|
||||
if (isNavigationFailure(error, NavigationFailureType.duplicated)
|
||||
|| isNavigationFailure(error, NavigationFailureType.redirected)) {
|
||||
logger.debug('Ignoring duplicated/redirected navigation from vue-router', { error })
|
||||
} else {
|
||||
throw error
|
||||
}
|
||||
|
|
|
|||
4
dist/files-main.js
vendored
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files_sharing-init-public.js
vendored
4
dist/files_sharing-init-public.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-init-public.js.map
vendored
2
dist/files_sharing-init-public.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue