From 755b384b76f320e859c259260c9133d2ec54d19d Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 21 Dec 2019 13:41:53 -0500 Subject: [PATCH] [F] Fix initial index conversion --- src/logic/nav-controller.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/logic/nav-controller.ts b/src/logic/nav-controller.ts index 1e2897c..bc4beaf 100644 --- a/src/logic/nav-controller.ts +++ b/src/logic/nav-controller.ts @@ -21,7 +21,7 @@ export default class NavController // Set history state let url = '/' + window.location.hash; if (url == '/' || url == '') url = '/#overall'; - window.history.replaceState({lastTab: url.substring(1)}, '', url); + window.history.replaceState(this.convertIndex('overall'), '', url); // Update initial index after loading is done // TODO: Test this @@ -48,7 +48,7 @@ export default class NavController */ updateIndex(index: Index | string, history: boolean = true) { - index = this.checkIndex(index); + index = this.convertIndex(index); // Call custom event if (this.updateCallback != null) this.updateCallback(); @@ -79,7 +79,7 @@ export default class NavController * @param index Hash and title | Hash only * @return Index Hash and title */ - private checkIndex(index: Index | string): Index + private convertIndex(index: Index | string): Index { // Convert index format if it is hash only if (typeof index == 'string') index = {hash: index, identifier: index};