Skip to content

Commit

Permalink
[fixed] Listen to path changes caused by initial redirect, fixes remi…
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Oct 10, 2014
1 parent d47d7dd commit dee374f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions modules/mixins/LocationContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dee374f

Please sign in to comment.