Fix: use Array.isArray

This commit is contained in:
eight 2017-11-01 09:28:54 +08:00
parent d981660983
commit 45e70b2b6a

View File

@ -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)));