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