fix(vue): go back to correct view with memory history (#25732)

resolves #25705
This commit is contained in:
Liam DeBeasi
2022-08-08 12:28:54 -04:00
committed by GitHub
parent 36bea1ca25
commit 832788971a
2 changed files with 82 additions and 1 deletions

View File

@ -120,7 +120,12 @@ export const createIonRouter = (opts: IonicVueRouterOptions, router: Router) =>
* will go back in a linear fashion.
*/
prevInfo.pathname === routeInfo.pushedByRoute &&
routeInfo.tab === '' && prevInfo.tab === ''
/**
* Tab info can be undefined or '' (empty string)
* both are false-y values, so we can just use !.
*/
!routeInfo.tab && !prevInfo.tab
)
) {
router.back();