From 862998c2b43c8d5b9dfd54e3d81ebeb221e19bae Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Thu, 8 Mar 2018 08:00:12 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20don=E2=80=99t=20validate=20empty=20confi?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/workers/repository/validate.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/workers/repository/validate.js b/lib/workers/repository/validate.js index 0c5e157dd0..5dd48e04c4 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, + })) + ); + } } } } -- GitLab