Skip to content
Snippets Groups Projects
Unverified Commit a9bb5b91 authored by Norbert Szulc's avatar Norbert Szulc Committed by GitHub
Browse files

fix(workers/repository): defensive assignment in patchConfigForArtifactsUpdate (#27639)

parent f74ece18
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment