fix(app): fix a Javascript error related to missing $state parameter (#1562)

pull/1576/head
Anthony Lapenna 2018-01-09 20:06:19 +01:00 committed by GitHub
parent 46da85c8cf
commit a515b96a46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ angular.module('portainer')
StateManager.initialize() StateManager.initialize()
.then(function success(state) { .then(function success(state) {
if (state.application.authentication) { if (state.application.authentication) {
initAuthentication(authManager, Authentication, $rootScope); initAuthentication(authManager, Authentication, $rootScope, $state);
} }
if (state.application.analytics) { if (state.application.analytics) {
initAnalytics(Analytics, $rootScope); initAnalytics(Analytics, $rootScope);
@ -30,7 +30,7 @@ angular.module('portainer')
}]); }]);
function initAuthentication(authManager, Authentication, $rootScope) { function initAuthentication(authManager, Authentication, $rootScope, $state) {
authManager.checkAuthOnRefresh(); authManager.checkAuthOnRefresh();
authManager.redirectWhenUnauthenticated(); authManager.redirectWhenUnauthenticated();
Authentication.init(); Authentication.init();