diff --git a/js/worker-util.js b/js/worker-util.js index dd19ac6c..5e081959 100644 --- a/js/worker-util.js +++ b/js/worker-util.js @@ -87,10 +87,7 @@ var workerUtil = (() => { }, err); } - function loadScript(scripts) { - if (!Array.isArray(scripts)) { - scripts = [scripts]; - } + function loadScript(...scripts) { const urls = scripts.filter(u => !loadedScripts.has(u)); if (!urls.length) { return;