Skip to content

Commit b7a97ea

Browse files
authored
Merge pull request #512 from p-rk/navfix
comparing location properly with pathname and search
2 parents aa1d045 + 5b427e7 commit b7a97ea

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/components/ReduxAsyncConnect/ReduxAsyncConnect.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ class ReduxAsyncConnect extends Component {
2525
const {
2626
history, location, routes, store, helpers
2727
} = this.props;
28-
const navigated = nextProps.location !== location;
28+
const {
29+
location: { pathname, search }
30+
} = nextProps;
31+
const navigated = `${pathname}${search}` !== `${location.pathname}${location.search}`;
2932

3033
if (navigated) {
3134
// save the location so we can render the old screen

0 commit comments

Comments
 (0)