From d88fbc9bf2452d0f9ee13e40042751fb1d97fce0 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Sun, 11 Feb 2018 17:11:20 +0100 Subject: [PATCH] fix: add config.updatedPackageFiles check --- lib/workers/branch/lock-files.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/workers/branch/lock-files.js b/lib/workers/branch/lock-files.js index 46fe54acae..4347dbd8a6 100644 --- a/lib/workers/branch/lock-files.js +++ b/lib/workers/branch/lock-files.js @@ -107,12 +107,20 @@ function determineLockFileDirs(config) { } } - if (config.updatedPackageFiles.length && config.lernaLockFile) { + if ( + config.updatedPackageFile && + config.updatedPackageFiles.length && + config.lernaLockFile + ) { lernaDirs.push('.'); } // If yarn workspaces are in use, then we need to generate yarn.lock from the workspaces dir - if (config.updatedPackageFiles.length && config.workspaceDir) { + if ( + config.updatedPackageFiles && + config.updatedPackageFiles.length && + config.workspaceDir + ) { const updatedPackageFileNames = config.updatedPackageFiles.map(p => p.name); for (const packageFile of config.packageFiles) { if ( -- GitLab