From 45e70b2b6a7f1d6d2c1032cc8027964eac632e17 Mon Sep 17 00:00:00 2001 From: eight Date: Wed, 1 Nov 2017 09:28:54 +0800 Subject: [PATCH] Fix: use Array.isArray --- js/script-loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/script-loader.js b/js/script-loader.js index a7030282..35d0ecde 100644 --- a/js/script-loader.js +++ b/js/script-loader.js @@ -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)));