toLoad is always an array
This commit is contained in:
parent
f740686cb5
commit
ea7c26ce71
|
@ -78,7 +78,7 @@ if (self.WorkerGlobalScope) {
|
|||
const toLoad = (Array.isArray(urls) ? urls : [urls])
|
||||
.map(u => u.endsWith('.js') ? u : u + '.js')
|
||||
.filter(u => !loadedUrls.includes(u));
|
||||
if (toLoad) {
|
||||
if (toLoad.length) {
|
||||
loadedUrls.push(...toLoad);
|
||||
importScripts(...toLoad);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user