Skip to content

Commit efc36de

Browse files
committed
fix: use route name comparison
1 parent e96f20e commit efc36de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/components/ScrollToTop.client.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const route = useRoute()
33
44
// Pages where scroll-to-top should NOT be shown
55
const excludedRoutes = new Set(['index', 'code'])
6-
const isPackagePage = computed(() => route.path.includes('/package/'))
6+
const isPackagePage = computed(() => route.name === 'package' || route.name === 'package-version')
77
88
const isActive = computed(() => !excludedRoutes.has(route.name as string) && !isPackagePage.value)
99

0 commit comments

Comments
 (0)