diff --git a/modules/mixins/LocationContext.js b/modules/mixins/LocationContext.js index 3de36afaeb..d563f3520b 100644 --- a/modules/mixins/LocationContext.js +++ b/modules/mixins/LocationContext.js @@ -47,17 +47,13 @@ var LocationContext = { if (location) { PathStore.setup(location); + PathStore.addChangeListener(this.handlePathChange); if (this.updateLocation) this.updateLocation(PathStore.getCurrentPath(), PathStore.getCurrentActionType()); } }, - componentDidMount: function () { - if (this.getLocation()) - PathStore.addChangeListener(this.handlePathChange); - }, - componentWillUnmount: function () { if (this.getLocation()) PathStore.removeChangeListener(this.handlePathChange);