diff --git a/src/client/app/router.ts b/src/client/app/router.ts index 14c9120640a4..49bf9441c75a 100644 --- a/src/client/app/router.ts +++ b/src/client/app/router.ts @@ -109,6 +109,15 @@ export function createRouter( latestPendingPath = null route.path = pendingPath route.component = fallbackComponent ? markRaw(fallbackComponent) : null + // reset page data + route.data = { + relativePath: '', + title: '404', + description: 'Not Found', + headers: [], + frontmatter: {}, + lastUpdated: 0 + } } } } diff --git a/src/client/theme-default/components/LastUpdated.vue b/src/client/theme-default/components/LastUpdated.vue index ab888fbc222e..3191ab05e0c0 100644 --- a/src/client/theme-default/components/LastUpdated.vue +++ b/src/client/theme-default/components/LastUpdated.vue @@ -7,7 +7,7 @@ const { theme, page } = useData() const hasLastUpdated = computed(() => { const lu = theme.value.lastUpdated - return lu !== undefined && lu !== false + return lu !== undefined && lu !== false && page.value.lastUpdated !== 0 }) const prefix = computed(() => {