Skip to content

Commit

Permalink
fix(npm): handle null lockfile after update
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Aug 2, 2023
1 parent 6520967 commit db5b08f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/modules/manager/npm/post-update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ export async function getAdditionalFiles(
lockFile: npmLock,
stderr: res.stderr,
});
} else {
} else if (res.lockFile) {
const existingContent = await getFile(
npmLock,
config.reuseExistingBranch ? config.branchName : config.baseBranch
Expand All @@ -607,7 +607,7 @@ export async function getAdditionalFiles(
path: npmLock,
// TODO: can this be undefined? (#7154)

contents: res.lockFile!.replace(tokenRe, ''),
contents: res.lockFile.replace(tokenRe, ''),
});
}
}
Expand Down

0 comments on commit db5b08f

Please sign in to comment.