Skip to content

Commit 577f430

Browse files
committed
Fix otherVersion check
1 parent d0afe4a commit 577f430

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/optimize.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ async function addOverrides(
748748
) {
749749
const otherVersion = (await fetchPackageManifest(thisSpec))
750750
?.version
751-
if (otherVersion !== version) {
751+
if (otherVersion && otherVersion !== version) {
752752
newSpec = `${sockOverridePrefix}${pin ? otherVersion : `^${semver.major(otherVersion)}`}`
753753
}
754754
}

0 commit comments

Comments
 (0)