diff --git a/packages/nx/src/plugins/js/index.ts b/packages/nx/src/plugins/js/index.ts index 185bd51ffaf40..bc2d78223af8b 100644 --- a/packages/nx/src/plugins/js/index.ts +++ b/packages/nx/src/plugins/js/index.ts @@ -34,15 +34,11 @@ export const processProjectGraph: ProjectGraphProcessor = async ( let parsedLockFile: ProjectGraph; if (lockFileNeedsReprocessing(lockHash)) { parsedLockFile = parseLockFile(); - if (parsedLockFile) { - writeLastProcessedLockfileHash(lockHash, parsedLockFile); - } + writeLastProcessedLockfileHash(lockHash, parsedLockFile); } else { parsedLockFile = readParsedLockFile(); } - if (parsedLockFile) { - builder.mergeProjectGraph(parsedLockFile); - } + builder.mergeProjectGraph(parsedLockFile); } }