Fix: use Array.isArray
This commit is contained in:
parent
d981660983
commit
45e70b2b6a
|
@ -38,7 +38,7 @@ var loadScript = (() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return files => {
|
return files => {
|
||||||
if (!files.map) {
|
if (!Array.isArray(files)) {
|
||||||
files = [files];
|
files = [files];
|
||||||
}
|
}
|
||||||
return Promise.all(files.map(f => (typeof f === 'string' ? inject(f) : f)));
|
return Promise.all(files.map(f => (typeof f === 'string' ? inject(f) : f)));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user