MDL-72609 core: Remove YUI from M.util.pendingJS

This commit is contained in:
Andrew Nicols
2023-01-23 15:02:55 +08:00
parent b8f6b7602b
commit fcad49b03b
+1 -3
View File
@@ -704,9 +704,7 @@ YUI.add('moodle-core-io', function(Y) {
* @return {Number} Number of pending items remaining after removing this item
*/
M.util.js_complete = function(uniqid) {
// Use the Y.Array.indexOf instead of the native because some older browsers do not support
// the native function. Y.Array polyfills the native function if it does not exist.
var index = Y.Array.indexOf(M.util.pending_js, uniqid);
const index = M.util.pending_js.indexOf(uniqid);
if (index >= 0) {
M.util.complete_js.push(M.util.pending_js.splice(index, 1)[0]);
} else {