From 3a7eed9962f1a10e6614c0787ca4293d7606c2c6 Mon Sep 17 00:00:00 2001 From: Ben Wheeler <wheeler.benjamin@gmail.com> Date: Mon, 8 Oct 2018 16:59:30 -0400 Subject: [PATCH] hash-parser-hoc: changed componentWillReceiveProps to componentDidUpdate --- src/lib/hash-parser-hoc.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/hash-parser-hoc.jsx b/src/lib/hash-parser-hoc.jsx index fa22f2bc9..6b0242da8 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); -- GitLab