From 0bc9ca62b10571666b12d427fe176ffe571bd617 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Fri, 21 Jun 2019 13:24:08 +0200 Subject: [PATCH] use isArray check --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 4ee289bd..435594db 100644 --- a/src/index.js +++ b/src/index.js @@ -95,7 +95,7 @@ module.exports = ( const externalMap = new Map(); - if (externals instanceof Array) + if (Array.isArray(externals)) externals.forEach(external => externalMap.set(external, external)); else if (typeof externals === 'object') Object.keys(externals).forEach(external => externalMap.set(external, externals[external]));