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 21, 2020
1 parent adc65f8 commit 93f4404
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 93f4404

Please sign in to comment.