From 642cf4038a1fd2df73c0c8d108316b2e20bf3f2f Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Sat, 13 Jan 2018 00:29:27 +0330 Subject: [PATCH] fix: regression with module.addVendor with array. fixes #2574. --- lib/core/module.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/module.js b/lib/core/module.js index 0a87757d37..704afc2853 100755 --- a/lib/core/module.js +++ b/lib/core/module.js @@ -24,8 +24,8 @@ module.exports = class ModuleContainer { addVendor(vendor) { /* istanbul ignore if */ - if (!vendor || typeof vendor !== 'string') { - throw new Error('Invalid vendor:' + vendor) + if (typeof vendor !== 'string' && !Array.isArray(vendor)) { + throw new Error('Invalid vendor: ' + vendor) } this.options.build.vendor = uniq(this.options.build.vendor.concat(vendor))