From 7186fe8b7eb27d2055e1d9d4838bceddfe3cf59d Mon Sep 17 00:00:00 2001 From: David Street Date: Thu, 3 Nov 2016 06:15:03 -0400 Subject: [PATCH] Only update history state if url differs. (#172) --- lib/router.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/router.js b/lib/router.js index d6e3d718..af3ce479 100644 --- a/lib/router.js +++ b/lib/router.js @@ -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