Skip to content
Snippets Groups Projects
Commit 561a8fd1 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

fix issue where currentUserPromise can be null when route changes, so check for it first.

parent 8150e99c
No related branches found
No related tags found
No related merge requests found
......@@ -94,11 +94,13 @@ CorvusServices.factory('AppState', ['$rootScope', '$q', '$location', '$timeout',
// this code is here to ensure that we have resolved our currentUser BEFORE we execute any other
// code meant to establish app context based on the current route
currentUserPromise.then(function(user) {
service.routeChangedImpl(event);
}, function(error) {
service.routeChangedImpl(event);
});
if (currentUserPromise) {
currentUserPromise.then(function(user) {
service.routeChangedImpl(event);
}, function(error) {
service.routeChangedImpl(event);
});
}
},
routeChangedImpl: function(event) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment