RED-7116, change redirect so it wouldnt cause a loop, prevent double navigations.
This commit is contained in:
parent
e6108be4b8
commit
c84918ab9b
@ -29,8 +29,9 @@ export function webViewerLoadedGuard(): CanActivateFn | ResolveFn<boolean> {
|
||||
try {
|
||||
instance = await pdf.init(inject(DOCUMENT).getElementById('viewer'));
|
||||
} catch (e) {
|
||||
logger.warn('[PDF] WebViewerGuard error: ', e, 'redirecting to', state.url);
|
||||
return router.navigateByUrl(state.url);
|
||||
const redirectUrl = state.url.split('/').slice(0, -2).join('/');
|
||||
logger.warn('[PDF] WebViewerGuard error: ', e, 'redirecting to', redirectUrl);
|
||||
return router.navigateByUrl(redirectUrl); // redirect to dissier page
|
||||
}
|
||||
|
||||
annotationManager.init(instance.Core.annotationManager);
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit d3ac14497d784fda844da062f9919d4391a425d9
|
||||
Subproject commit 66662a0314add0e9a2cff154e1370488f858d0d6
|
||||
Loading…
x
Reference in New Issue
Block a user