diff --git a/app/coffee/app.coffee b/app/coffee/app.coffee index 0ae11c6a..32b58883 100644 --- a/app/coffee/app.coffee +++ b/app/coffee/app.coffee @@ -430,7 +430,7 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, $tgEven # Add next param when user try to access to a secction need auth permissions. authHttpIntercept = ($q, $location, $navUrls, $lightboxService) -> httpResponseError = (response) -> - if response.status == 0 + if response.status == 0 || response.status == -1 $lightboxService.closeAll() $location.path($navUrls.resolve("error")) $location.replace() diff --git a/app/modules/components/joy-ride/joy-ride.directive.coffee b/app/modules/components/joy-ride/joy-ride.directive.coffee index f2d54a8c..4c23606e 100644 --- a/app/modules/components/joy-ride/joy-ride.directive.coffee +++ b/app/modules/components/joy-ride/joy-ride.directive.coffee @@ -1,6 +1,6 @@ taiga = @.taiga -JoyRideDirective = ($rootScope, currentUserService, joyRideService) -> +JoyRideDirective = ($rootScope, currentUserService, joyRideService, $location) -> link = (scope, el, attrs, ctrl) -> intro = introJs() @@ -30,7 +30,9 @@ JoyRideDirective = ($rootScope, currentUserService, joyRideService) -> intro.start() $rootScope.$on '$routeChangeSuccess', (event, next) -> - return if !next.joyride || !currentUserService.isAuthenticated() + return if !next.joyride || + !currentUserService.isAuthenticated() || + $location.path() == '/error' intro.oncomplete () -> currentUserService.disableJoyRide(next.joyride) @@ -53,7 +55,8 @@ JoyRideDirective = ($rootScope, currentUserService, joyRideService) -> JoyRideDirective.$inject = [ "$rootScope", "tgCurrentUserService", - "tgJoyRideService" + "tgJoyRideService", + "$location" ] angular.module("taigaComponents").directive("tgJoyRide", JoyRideDirective)