Make sure the script is executed before the callback method.

pull/2854/head
maliming 5 years ago
parent 5bd73fd9f1
commit 1638d5cefb

@ -359,13 +359,17 @@
var _loadScript = function (url, loadCallback, failCallback) {
_loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
$.getScript(url)
.done(function () {
urlInfo.succeed();
})
.fail(function () {
urlInfo.failed();
});
$.get({
url: url,
dataType: 'text'
})
.done(function (script) {
jQuery.globalEval(script);
urlInfo.succeed();
})
.fail(function () {
urlInfo.failed();
});
});
};

Loading…
Cancel
Save