Skip to content
This repository was archived by the owner on Sep 20, 2020. It is now read-only.

Commit 5fbd478

Browse files
author
christhielen
committed
fix(transition): mitigate angular-permissions causing exceptions.
angular-permissions is firing fake state events. detecting a specific scenario (too many statechangestart events) and exiting early from the event listener.
1 parent be9ff9a commit 5fbd478

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/transition.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ angular.module("ct.ui.router.extras.transition", [ 'ct.ui.router.extras.core' ])
7575

7676
// This event is handled synchronously in transitionTo call stack
7777
$rootScope.$on("$stateChangeStart", function (evt, toState, toParams, fromState, fromParams) {
78+
if (transitionDepth >= tDataStack.length) return;
7879
var depth = transitionDepth;
7980
// To/From is now normalized by ui-router. Add this information to the transition data object.
8081
var tData = angular.extend(tDataStack[depth], {

0 commit comments

Comments
 (0)