fix(react, vue): tab buttons no longer throw an error if href is undefined (#22998)

resolves #22997
This commit is contained in:
Liam DeBeasi
2021-03-02 10:05:59 -05:00
committed by GitHub
parent 9282aa6871
commit 943e3f6ae3
2 changed files with 6 additions and 2 deletions

View File

@ -252,7 +252,9 @@ export const createIonRouter = (opts: IonicVueRouterOptions, router: Router) =>
}
}
const changeTab = (tab: string, path: string) => {
const changeTab = (tab: string, path?: string) => {
if (!path) return;
const routeInfo = locationHistory.getCurrentRouteInfoForTab(tab);
const [pathname] = path.split('?');