Fixed onUserLoggedIn/Out not firing correctly on startup anymore

Introduced by b205e84d4b
This commit is contained in:
Gina Häußge 2017-06-30 09:39:14 +02:00
parent 836fbef6d8
commit ac3f4d598c

View file

@ -66,7 +66,7 @@ $(function() {
};
if (self.startupDeferred !== undefined) {
// Make sure we only fire our "onUserLogged(In|Out)" message when the application
// Make sure we only fire our "onUserLogged(In|Out)" message after the application
// has started up.
self.startupDeferred.done(process);
} else {
@ -135,12 +135,11 @@ $(function() {
self.onAllBound = function(allViewModels) {
self.allViewModels = allViewModels;
self.startupDeferred.resolve();
self.startupDeferred = undefined;
};
self.onStartup = function() {
self.startupDeferred.resolve();
self.startupDeferred = undefined;
self.elementUsernameInput = $("#login_user");
self.elementPasswordInput = $("#login_pass");
self.elementLoginButton = $("#login_button");