Skip to content

Commit

Permalink
fix(workers/repository): defensive assignment in patchConfigForArtifa…
Browse files Browse the repository at this point in the history
…ctsUpdate (#27639)
  • Loading branch information
not7cd committed Feb 29, 2024
1 parent f74ece1 commit a9bb5b9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/workers/repository/update/branch/get-updated.ts
Expand Up @@ -379,8 +379,12 @@ function patchConfigForArtifactsUpdate(
const packageFile = managerPackageFiles.find(
(p) => p.packageFile === packageFileName,
);
if (packageFile) {
updatedConfig.lockFiles ??= packageFile.lockFiles;
if (
packageFile &&
is.nonEmptyArray(updatedConfig.lockFiles) &&
is.nonEmptyArray(packageFile.lockFiles)
) {
updatedConfig.lockFiles = packageFile.lockFiles;
}
}
return updatedConfig;
Expand Down

0 comments on commit a9bb5b9

Please sign in to comment.