Skip to content

Commit

Permalink
Fix location state (supasate#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlazPocrnja committed Mar 9, 2020
1 parent 9b3ef9b commit 55c7447
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ConnectedRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { connect, ReactReduxContext } from 'react-redux'
import { Router } from 'react-router'
import { isEqual } from 'lodash'
import { onLocationChanged } from './actions'
import createSelectors from './selectors'

Expand Down Expand Up @@ -45,7 +46,7 @@ const createConnectedRouter = (structure) => {
(pathnameInHistory !== pathnameInStore ||
searchInHistory !== searchInStore ||
hashInHistory !== hashInStore ||
stateInStore !== stateInHistory)
!isEqual(stateInStore, stateInHistory))
) {
this.inTimeTravelling = true
// Update history's location to match store's location
Expand Down

0 comments on commit 55c7447

Please sign in to comment.