fix: regression with module.addVendor with array. fixes #2574.

This commit is contained in:
Pooya Parsa 2018-01-13 00:29:27 +03:30
parent 1dbeb132d2
commit 642cf4038a

View File

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