File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ const publishSecurityDowngrade = computed(() => {
244244
245245const installVersionOverride = computed (() => {
246246 if (! publishSecurityDowngrade .value ) return null
247- return publishSecurityDowngrade .value ? .trustedVersion ?? null
247+ return publishSecurityDowngrade .value .trustedVersion
248248})
249249
250250const sizeTooltip = computed (() => {
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ export function detectPublishSecurityDowngrade(
5353 } ) )
5454 . sort ( sortByRecency )
5555
56- const latest = sorted [ 0 ]
56+ const latest = sorted . at ( 0 )
5757 if ( ! latest || latest . hasProvenance ) return null
5858
5959 const latestTrusted = sorted . find ( version => version . hasProvenance )
@@ -89,7 +89,7 @@ export function detectPublishSecurityDowngradeForVersion(
8989 const currentIndex = sorted . findIndex ( version => version . version === viewedVersion )
9090 if ( currentIndex === - 1 ) return null
9191
92- const current = sorted [ currentIndex ]
92+ const current = sorted . at ( currentIndex )
9393 if ( ! current || current . hasProvenance ) return null
9494
9595 const trustedOlder = sorted . slice ( currentIndex + 1 ) . find ( version => version . hasProvenance )
You can’t perform that action at this time.
0 commit comments