From ea46d16836c81a4fb3bc5d947aaaa84d0538ba89 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 21 Dec 2019 11:49:06 -0500 Subject: [PATCH] [+] Encapsulate updateIndex with only hash --- src/logic/navigator.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/logic/navigator.ts b/src/logic/navigator.ts index d825011..7b297c8 100644 --- a/src/logic/navigator.ts +++ b/src/logic/navigator.ts @@ -11,6 +11,17 @@ export default class Navigator private activeIndex: Index; private updateCallback?: () => void; + /** + * Update index + * + * @param hash + * @param history Record in history or not (Default true) + */ + updateIndexHash(hash: string, history?: boolean) + { + this.updateIndex({hash: hash}, history) + } + /** * Update index *