fix(navigation): ensure secondaryId always has a string value (#12641)

This commit is contained in:
Brian Soumakian
2017-08-31 10:31:14 -07:00
committed by Ken Sodemann
parent 295fe783b0
commit 106950533c

View File

@@ -642,7 +642,7 @@ export class Tabs extends Ion implements AfterViewInit, RootNode, ITabs, Navigat
/**
* @private
*/
_getSelectedTabIndex(secondaryId: string, fallbackIndex: number = 0): number {
_getSelectedTabIndex(secondaryId: string = '', fallbackIndex: number = 0): number {
// we found a segment which probably represents which tab to select
const indexMatch = secondaryId.match(/tab-(\d+)/);
if (indexMatch) {