-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Direct navigation to URL in SPA with vue-router in hash mode
This fixes bug that triggers in quite specific situation - SPA mode with Vue-router set to use hash mode. In that setup if user navigates directly to an URL that will trigger certain route and that route's `path` does not *exactly* match the path user navigated to (for example due to extra trailing slash or query parameter in user's URL), that triggers redirect that fails due to target route being the same. That leaves current route in a broken state. I assume because that route wasn't committed yet. Fix by comparing routes in more sophisticated way than just comparing route's path. Instead use VueRouter to resolve route from path and then compare that with current route. Resolves #490
- Loading branch information
Showing
3 changed files
with
113 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters