summaryrefslogtreecommitdiffstats
path: root/core/js/l10n.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-11-19 17:02:17 +0100
committerVincent Petry <pvince81@owncloud.com>2014-11-19 17:02:17 +0100
commitffe57d89e425771a5c027a3484d772319919d15d (patch)
tree5448803790f3ef015120cd6a3566ecaceddee2c3 /core/js/l10n.js
parent1c5933c96cd68f353165a02a76dd47760e8d493e (diff)
downloadnextcloud-server-ffe57d89e425771a5c027a3484d772319919d15d.tar.gz
nextcloud-server-ffe57d89e425771a5c027a3484d772319919d15d.zip
Fix l10n promises
Diffstat (limited to 'core/js/l10n.js')
-rw-r--r--core/js/l10n.js9
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;