Skip to content

Commit 70486ca

Browse files
committed
fix: validate current install size staleness during navigation
1 parent 96f43bb commit 70486ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/composables/useInstallSizeDiff.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ export function useInstallSizeDiff(
8383
const cv = comparisonVersion.value
8484

8585
if (!current || !previous || !cv) return null
86-
if (previous.version !== cv || previous.package !== toValue(packageName)) return null
86+
const name = toValue(packageName)
87+
const version = toValue(resolvedVersion)
88+
if (previous.version !== cv || previous.package !== name) return null
89+
if (current.version !== version || current.package !== name) return null
8790

8891
const sizeRatio =
8992
previous.totalSize > 0 ? (current.totalSize - previous.totalSize) / previous.totalSize : 0

0 commit comments

Comments
 (0)