diff --git a/lib/workers/branch/lock-files.js b/lib/workers/branch/lock-files.js index 46fe54acae5a7dec35c5394a29501ce2c890ff8e..4347dbd8a6642405bf75acbba17aefe7673b0750 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 (