diff --git a/src/lib/hash-parser-hoc.jsx b/src/lib/hash-parser-hoc.jsx index fa22f2bc90e2c27200018300d528cf115551003f..6b0242da893e55ff53909affa19f7c0a834b09e1 100644 --- a/src/lib/hash-parser-hoc.jsx +++ b/src/lib/hash-parser-hoc.jsx @@ -28,9 +28,9 @@ const HashParserHOC = function (WrappedComponent) { window.addEventListener('hashchange', this.handleHashChange); this.handleHashChange(); } - componentWillReceiveProps (nextProps) { + componentDidUpdate (prevProps) { // if we are newly fetching a non-hash project... - if (nextProps.isFetchingProjectWithNoURLId && !this.props.isFetchingProjectWithNoURLId) { + if (this.props.isFetchingProjectWithNoURLId && !prevProps.isFetchingProjectWithNoURLId) { // ...clear the hash from the url history.pushState('new-project', 'new-project', window.location.pathname + window.location.search);