diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-11-19 17:02:17 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-11-19 17:02:17 +0100 |
commit | ffe57d89e425771a5c027a3484d772319919d15d (patch) | |
tree | 5448803790f3ef015120cd6a3566ecaceddee2c3 /core/js/l10n.js | |
parent | 1c5933c96cd68f353165a02a76dd47760e8d493e (diff) | |
download | nextcloud-server-ffe57d89e425771a5c027a3484d772319919d15d.tar.gz nextcloud-server-ffe57d89e425771a5c027a3484d772319919d15d.zip |
Fix l10n promises
Diffstat (limited to 'core/js/l10n.js')
-rw-r--r-- | core/js/l10n.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/js/l10n.js b/core/js/l10n.js index 3e37da01369..0c660584322 100644 --- a/core/js/l10n.js +++ b/core/js/l10n.js @@ -37,10 +37,11 @@ OC.L10N = { load: function(appName, callback) { // already available ? if (this._bundles[appName] || OC.getLocale() === 'en') { - if (callback) { - callback(); - } - return; + var deferred = $.Deferred(); + var promise = deferred.promise(); + promise.then(callback); + deferred.resolve(); + return promise; } var self = this; |