2.2.0
https://jsfiddle.net/wjunjie/fg0eu4ey/
Click link:
scrollBehavior ( to, from, savedPosition ) {
console.log(to) == console.log(from) ; //true
}
to: Route: the target Route Object being navigated to.
from: Route: the current route being navigated away from.
to: Route: the target Route Object being navigated to.
from: Route: the target Route Object being navigated to.
// 英文不好,希望回复中文,谢谢。
I'd say this is intended to make it possible to recognise the same router view is being reused. It also happen with params btw.
wdyt @fnlctrl
But to is always equal to from :joy: :joy: :joy: https://jsfiddle.net/dus1anxL/...
Creating a PR to fix this..
Hi, is there any workaround until next release?
Yes, that's a good question. I was bitten by this yesterday. I'm not sure if there is a reasonable workaround.
Just released 2.3.1 for this fix.
Most helpful comment
But
tois always equal tofrom:joy: :joy: :joy: https://jsfiddle.net/dus1anxL/...Creating a PR to fix this..