mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Fixed loading templates from DOM
This commit is contained in:
@ -18,13 +18,14 @@ App.Promise = function(_, jQuery) {
|
||||
active = _.without(active, promise.promiseId);
|
||||
});
|
||||
|
||||
active.push(promise.promiseId);
|
||||
|
||||
promise.then(function() {
|
||||
if (!_.contains(active, promise.promiseId)) {
|
||||
throw new Error('Broken promise');
|
||||
throw new Error('Broken promise (promise ID: ' + promise.promiseId + ')');
|
||||
}
|
||||
});
|
||||
|
||||
active.push(promise.promiseId);
|
||||
return promise;
|
||||
}
|
||||
|
||||
|
@ -62,6 +62,7 @@ App.Util = function(_, jQuery, promise) {
|
||||
resolve(templateCache[templateName]);
|
||||
});
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function promiseTemplateFromDOM(templateName) {
|
||||
|
Reference in New Issue
Block a user