diff --git a/lib/plugins/plugin-validator.js b/lib/plugins/plugin-validator.js index 60e4758e39..2a392608d0 100644 --- a/lib/plugins/plugin-validator.js +++ b/lib/plugins/plugin-validator.js @@ -95,7 +95,7 @@ function validateMetaUrls (metaUrls) { return } - if (typeof metaUrls !== 'object') { + if (typeof metaUrls !== 'object' || Array.isArray(metaUrls)) { errors.push('The meta.urls must be an object if entered') return } @@ -124,7 +124,7 @@ function validateMetaUrls (metaUrls) { function validateMeta (meta) { const metaKeys = ['urls', 'description'] - if (typeof meta !== 'object') { + if (typeof meta !== 'object' || Array.isArray(meta)) { errors.push('The meta must be an object if entered') return } @@ -143,7 +143,7 @@ function validateMeta (meta) { } function validatePluginDependency (key, configEntry) { - if (typeof configEntry === 'string') { + if (typeof configEntry !== 'object' || Array.isArray(configEntry)) { return } // Can be a string, but if an object, the packageName must be a string