Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

just return the promise() instead of the deferred obj - avoid manipul…

…ation outside
  • Loading branch information...
commit 7a48021e46eaa0b5b69021ab555e9c31b97ba238 1 parent 0802cf0
@jamuhl jamuhl authored
View
4 release/i18next-1.5.11pre.js
@@ -587,7 +587,7 @@
if (deferred) deferred.resolve();
});
- return deferred;
+ return deferred.promise();
}
function preload(lngs, cb) {
if (typeof lngs === 'string') lngs = [lngs];
@@ -888,7 +888,7 @@
if (found === undefined && o.sendMissing) {
if (options.lng) {
- sync.postMissing(options.lng, ns, key, notfound, lngs);
+ sync.postMissing(lngs[0], ns, key, notfound, lngs);
} else {
sync.postMissing(o.lng, ns, key, notfound, lngs);
}
View
BIN  release/i18next-1.5.11pre.zip
Binary file not shown
View
4 release/i18next.amd-1.5.11pre.js
@@ -583,7 +583,7 @@
if (deferred) deferred.resolve();
});
- return deferred;
+ return deferred.promise();
}
function preload(lngs, cb) {
if (typeof lngs === 'string') lngs = [lngs];
@@ -884,7 +884,7 @@
if (found === undefined && o.sendMissing) {
if (options.lng) {
- sync.postMissing(options.lng, ns, key, notfound, lngs);
+ sync.postMissing(lngs[0], ns, key, notfound, lngs);
} else {
sync.postMissing(o.lng, ns, key, notfound, lngs);
}
View
BIN  release/i18next.amd-1.5.11pre.zip
Binary file not shown
View
4 release/i18next.amd.withJQuery-1.5.11pre.js
@@ -584,7 +584,7 @@
if (deferred) deferred.resolve();
});
- return deferred;
+ return deferred.promise();
}
function preload(lngs, cb) {
if (typeof lngs === 'string') lngs = [lngs];
@@ -885,7 +885,7 @@
if (found === undefined && o.sendMissing) {
if (options.lng) {
- sync.postMissing(options.lng, ns, key, notfound, lngs);
+ sync.postMissing(lngs[0], ns, key, notfound, lngs);
} else {
sync.postMissing(o.lng, ns, key, notfound, lngs);
}
View
2  src/i18next.init.js
@@ -70,5 +70,5 @@ function init(options, cb) {
if (deferred) deferred.resolve();
});
- return deferred;
+ return deferred.promise();
}
Please sign in to comment.
Something went wrong with that request. Please try again.