fix: reset page data on 404

pull/497/head
Divyansh Singh 4 years ago
parent 2566bc96d8
commit 6a15b11c4b

@ -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
}
}
}
}

@ -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(() => {

Loading…
Cancel
Save