Skip to content

Commit 8fd2100

Browse files
committed
deprecation notice logic
1 parent 720d2ac commit 8fd2100

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

app/pages/[...package].vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,9 @@ const deprecationNotice = computed(() => {
135135
if (!displayVersion.value?.deprecated) return null
136136
137137
const isLatestDeprecated = !!latestVersion.value?.deprecated
138-
const isViewingLatest =
139-
!requestedVersion.value || displayVersion.value?.version === latestVersion.value?.version
140138
141-
// Show "package deprecated" if viewing latest OR if the whole package (latest) is deprecated
142-
if (isViewingLatest || isLatestDeprecated) {
139+
// If latest is deprecated, show "package deprecated"
140+
if (isLatestDeprecated) {
143141
return { type: 'package' as const, message: displayVersion.value.deprecated }
144142
}
145143

0 commit comments

Comments
 (0)