From 581a48bc1f08a9d4b7c39651cf980603735a5f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Emonet?= Date: Wed, 2 Apr 2014 00:42:04 +0200 Subject: [PATCH] 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) --- core/deck.core.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/deck.core.js b/core/deck.core.js index a8adefe7..94c47ae9 100644 --- a/core/deck.core.js +++ b/core/deck.core.js @@ -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) {