[F] Update title after history

This commit is contained in:
Hykilpikonna
2019-10-20 21:59:11 -04:00
parent 51ea0c7a80
commit 07991b2a0e
+13 -12
View File
@@ -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);
}
/**