From 07991b2a0e992f05d8660e107e4f0e4889911303 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sun, 20 Oct 2019 21:59:11 -0400 Subject: [PATCH] [F] Update title after history --- src/components/navigation/navigation.ts | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/components/navigation/navigation.ts b/src/components/navigation/navigation.ts index a9e5e11..0ce99e7 100644 --- a/src/components/navigation/navigation.ts +++ b/src/components/navigation/navigation.ts @@ -77,20 +77,21 @@ export default class Navigation extends Vue // Call custom event this.$emit('update:activeIndex', newIndex); + // Record or not + if (history == null || history) + { + // Debug output TODO: Remove this + console.log(`onNavigate: Previous: ${this.activeIndex}, New: ${newIndex}`); + + // Check url + let url = `/${newIndex}`; + + // Push history state + window.history.pushState({lastTab: newIndex}, '', url); + } + // Update title document.title = 'Veracross Analyzer - ' + this.getTitle(newIndex); - - // Record or not - if (history != null && !history) return; - - // Debug output TODO: Remove this - console.log(`onNavigate: Previous: ${this.activeIndex}, New: ${newIndex}`); - - // Check url - let url = `/${newIndex}`; - - // Push history state - window.history.pushState({lastTab: newIndex}, '', url); } /**