mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 01:03:03 +08:00

resolves #28201 This PR fixes the navigation issue related to `router.go` that was identified in issue #28201. After working on this issue I realised that @xxllxhdj has already created a PR for this in #29847. While their fix is great, I have added tests to replicate the issue, reused existing code and `undefined` will be returned in unexpected situations - which matches the existing functionality. ## What is the current behavior? If a user navigates from `/home` -> `/pageA` -> `/pageB` -> `/pageC` -> back to `/pageB` -> then `router.go(-2)` is called the URL will be updated to `/home` correctly, but the app will try to render `/pageA`. This happens for any delta < -1. ## What is the new behavior? The app will correctly render `/pageA`, which matches the URL. ## Does this introduce a breaking change? - [ ] Yes - [X] No --------- Co-authored-by: xxllxhdj <12881488+xxllxhdj@users.noreply.github.com>
@ionic/vue-router
Routing integration for @ionic/vue
applications.
Building
- Install dependencies:
npm install
- Run build script:
npm run build
Tests
- Tests are found in the
__tests__
directory and use Jest. - Tests can be run using
npm run test.spec
- Bug fix and feature PRs should have new tests verifying the PR functionality.
Contributing
See our Contributing Guide.
Need Help?
Post your question on the Ionic Forum.