Skip to content

Commit dee374f

Browse files
committed
[fixed] Listen to path changes caused by initial redirect, fixes #360
1 parent d47d7dd commit dee374f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

modules/mixins/LocationContext.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,13 @@ var LocationContext = {
4747

4848
if (location) {
4949
PathStore.setup(location);
50+
PathStore.addChangeListener(this.handlePathChange);
5051

5152
if (this.updateLocation)
5253
this.updateLocation(PathStore.getCurrentPath(), PathStore.getCurrentActionType());
5354
}
5455
},
5556

56-
componentDidMount: function () {
57-
if (this.getLocation())
58-
PathStore.addChangeListener(this.handlePathChange);
59-
},
60-
6157
componentWillUnmount: function () {
6258
if (this.getLocation())
6359
PathStore.removeChangeListener(this.handlePathChange);

0 commit comments

Comments
 (0)