Merge pull request #59842 from nextcloud/fix/swallow-redirected-navigation

fix(files,files_sharing): swallow redirected navigation errors
This commit is contained in:
Ferdinand Thiessen 2026-04-23 16:22:18 +02:00 committed by GitHub
commit 96206dd183
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 12 deletions

View file

@ -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
}

View file

@ -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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long