MDL-72609 core: Fix complete_js to be a list of strings

This commit is contained in:
Andrew Nicols 2022-02-08 12:35:17 +08:00
parent 116ddb8933
commit b8f6b7602b

View file

@ -708,7 +708,7 @@ M.util.js_complete = function(uniqid) {
// the native function. Y.Array polyfills the native function if it does not exist. // the native function. Y.Array polyfills the native function if it does not exist.
var index = Y.Array.indexOf(M.util.pending_js, uniqid); var index = Y.Array.indexOf(M.util.pending_js, uniqid);
if (index >= 0) { if (index >= 0) {
M.util.complete_js.push(M.util.pending_js.splice(index, 1)); M.util.complete_js.push(M.util.pending_js.splice(index, 1)[0]);
} else { } else {
window.console.log("Unable to locate key for js_complete call", uniqid); window.console.log("Unable to locate key for js_complete call", uniqid);
} }