From cd94f5f2aaae6a9eb811ecfedc1797061489bd31 Mon Sep 17 00:00:00 2001 From: wali-s Date: Wed, 15 Apr 2015 12:39:41 -0700 Subject: [PATCH] Fixes onNavigation not being called when changing to identical route. `onNavigation` should still be called even if you're navigating to an identical route because `react-router-component` does create an entry in its history for it. I don't think it should just ignore it if they have the same path. --- lib/environment/PathnameEnvironment.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/environment/PathnameEnvironment.js b/lib/environment/PathnameEnvironment.js index 669b87c..6965e4c 100644 --- a/lib/environment/PathnameEnvironment.js +++ b/lib/environment/PathnameEnvironment.js @@ -51,9 +51,7 @@ PathnameEnvironment.prototype.stop = function() { PathnameEnvironment.prototype.onPopState = function(e) { var path = window.location.pathname; - if (this.path !== path) { - this.setPath(path, {isPopState: true}); - } + this.setPath(path, {isPopState: true}); }; module.exports = PathnameEnvironment;