You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow calling router instance methods before vue instantiation. (fix#795)
Previously it would throw errors.
Allowed methods: push, replace, go, back, forward
Reason:
These methods only try to manipulate browser history, and should work even when root vue instance has not been created.
Common use case:
Call `router.replace()` to set browser url state. This action doesn't require vue's existence, so it shouldn't throw an error when called before vue's instantiation.
Otherwise, users may need to check router's actual mode after fallback (history or hash) and then call `history.replaceState` or `location.replace` accordingly.
0 commit comments