[O] Make identifier required

This commit is contained in:
Hykilpikonna
2019-12-21 13:23:21 -05:00
parent 815258e8be
commit 4938b2a72a
+2 -2
View File
@@ -4,7 +4,7 @@ export interface Index
{ {
hash: string hash: string
title?: string title?: string
identifier?: string identifier: string
info?: any info?: any
} }
@@ -49,7 +49,7 @@ export default class NavController
updateIndex(index: Index | string, history?: boolean) updateIndex(index: Index | string, history?: boolean)
{ {
// Convert index format if it is hash only // Convert index format if it is hash only
if (typeof index == 'string') index = {hash: index}; if (typeof index == 'string') index = {hash: index, identifier: index};
// Call custom event // Call custom event
if (this.updateCallback != null) this.updateCallback(); if (this.updateCallback != null) this.updateCallback();