check if startup promise is resolved
This commit is contained in:
parent
160333beea
commit
8f613177cb
@ -101,9 +101,10 @@ angular.module('OpenSlidesApp.core', [
|
|||||||
_.forEach(Autoupdate.messageReceivers, function (receiver) {
|
_.forEach(Autoupdate.messageReceivers, function (receiver) {
|
||||||
receiver(event.data);
|
receiver(event.data);
|
||||||
});
|
});
|
||||||
// The first message is done: resolve the promise.
|
// Check if the promise is not resolved yet.
|
||||||
// TODO: check whether the promise is already resolved.
|
if (Autoupdate.firstMessageDeferred.promise.$$state.status === 0) {
|
||||||
Autoupdate.firstMessageDeferred.resolve();
|
Autoupdate.firstMessageDeferred.resolve();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
return Autoupdate;
|
return Autoupdate;
|
||||||
|
Loading…
Reference in New Issue
Block a user