Fix: use spread syntax in loadScript
This commit is contained in:
parent
b853be13f8
commit
ba5d6cc31a
|
@ -87,10 +87,7 @@ var workerUtil = (() => {
|
||||||
}, err);
|
}, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadScript(scripts) {
|
function loadScript(...scripts) {
|
||||||
if (!Array.isArray(scripts)) {
|
|
||||||
scripts = [scripts];
|
|
||||||
}
|
|
||||||
const urls = scripts.filter(u => !loadedScripts.has(u));
|
const urls = scripts.filter(u => !loadedScripts.has(u));
|
||||||
if (!urls.length) {
|
if (!urls.length) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user