1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Only update history state if url differs. (#172)

This commit is contained in:
David Street 2016-11-03 06:15:03 -04:00 committed by Naoyuki Kanezawa
parent 77739f4d5e
commit 7186fe8b7e

View file

@ -108,7 +108,10 @@ export default class Router {
throw err
}
window.history[method]({ route }, null, url)
if (getURL() !== url) {
window.history[method]({ route }, null, url)
}
this.route = route
this.set(url, { ...data, props })
return true