diff --git a/lib/javascript-static.js b/lib/javascript-static.js index ef41865c84f..92150820e54 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -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 {