Skip to content

Commit 406bdb0

Browse files
committed
fix logic
1 parent 0ea5fa4 commit 406bdb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/getPackageResolution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function getPackageResolution({
3636
"package.json",
3737
)).version as string
3838
const indexOfPlus = installedVersionLong.indexOf('+');
39-
const installedVersion = indexOfPlus === 0 ? installedVersionLong : installedVersionLong.substring(0, indexOfPlus)
39+
const installedVersion = indexOfPlus === -1 ? installedVersionLong : installedVersionLong.substring(0, indexOfPlus)
4040

4141
const entries = Object.entries(appLockFile.object).filter(
4242
([k, v]) =>

0 commit comments

Comments
 (0)