diff --git a/src/components/appRouter.js b/src/components/appRouter.js index f7b41d77f..28cf91ef1 100644 --- a/src/components/appRouter.js +++ b/src/components/appRouter.js @@ -427,12 +427,12 @@ class AppRouter { if (data.status === 403) { if (data.errorCode === 'ParentalControl') { - const isCurrentAllowed = this.currentRouteInfo ? (this.currentRouteInfo.route.anonymous || this.currentRouteInfo.route.startup) : true; + const isCurrentAllowed = appRouter.currentRouteInfo ? (appRouter.currentRouteInfo.route.anonymous || appRouter.currentRouteInfo.route.startup) : true; // Bounce to the login screen, but not if a password entry fails, obviously if (!isCurrentAllowed) { - this.showForcedLogoutMessage(globalize.translate('AccessRestrictedTryAgainLater')); - this.showLocalLogin(apiClient.serverId()); + appRouter.showForcedLogoutMessage(globalize.translate('AccessRestrictedTryAgainLater')); + appRouter.showLocalLogin(apiClient.serverId()); } } }