Fix: use spread syntax in loadScript
This commit is contained in:
parent
b853be13f8
commit
ba5d6cc31a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user