diff --git a/src/client/ui/_common_/header.vue b/src/client/ui/_common_/header.vue index 32207d5dca..5d7253c368 100644 --- a/src/client/ui/_common_/header.vue +++ b/src/client/ui/_common_/header.vue @@ -42,8 +42,11 @@ export default defineComponent({ }, watch: { - $route(to, from) { - this.canBack = (window.history.length > 0 && !['index'].includes(to.name)); + $route: { + handler(to, from) { + this.canBack = (window.history.length > 0 && !['index'].includes(to.name)); + }, + immediate: true }, },