diff --git a/lib/workers/repository/validate.js b/lib/workers/repository/validate.js index 0c5e157dd004064ab4c47c8b4bd6d353adccc032..5dd48e04c4c6f9f30fa80aa222f265e697ddd071 100644 --- a/lib/workers/repository/validate.js +++ b/lib/workers/repository/validate.js @@ -51,15 +51,17 @@ async function validatePrs(config) { file === 'package.json' ? parsed.renovate || parsed['renovate-config'] : parsed; - logger.debug({ config: toValidate }, 'Validating config'); - const { errors } = migrateAndValidate(config, toValidate); - if (errors && errors.length) { - validations = validations.concat( - errors.map(error => ({ - file, - message: error.message, - })) - ); + if (toValidate) { + logger.debug({ config: toValidate }, 'Validating config'); + const { errors } = migrateAndValidate(config, toValidate); + if (errors && errors.length) { + validations = validations.concat( + errors.map(error => ({ + file, + message: error.message, + })) + ); + } } } }