Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix possible double call to "beforeInitEvent.done()"
now surrounding beforeInitEvent notification with lockInit/releaseInit:
 - done() will be called as before (but with removed duplicate logic)
 - done() will not risk of being called twice (this happened when a beforeInitEvent trigger was locking and releasing the event fast)
  • Loading branch information
twitwi committed Apr 1, 2014
commit 581a48bc1f08a9d4b7c39651cf980603735a5f6e
5 changes: 2 additions & 3 deletions core/deck.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,9 @@ that use the API provided by core.
$document.trigger(events.initialize);
};

beforeInitEvent.lockInit();
$document.trigger(beforeInitEvent);
if (!beforeInitEvent.locks) {
beforeInitEvent.done();
}
beforeInitEvent.releaseInit();
window.setTimeout(function() {
if (beforeInitEvent.locks) {
if (window.console) {
Expand Down