Skip to content

Commit

Permalink
fix: unload state based on URL location
Browse files Browse the repository at this point in the history
  • Loading branch information
thisislawatts committed Oct 5, 2021
1 parent 68f39e4 commit 2b3ca93
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pages/Howto/Content/HowtoList/HowtoList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ export class HowtoList extends React.Component<any, IState> {
return this.props as InjectedProps
}

/* eslint-disable @typescript-eslint/naming-convention*/
UNSAFE_componentWillMount() {
if (!new RegExp(/source=how-to-not-found/).test(window.location.search)) {
this.props.howtoStore.updateReferrerSource('')
}
}

public render() {
const {
filteredHowtos,
Expand Down

0 comments on commit 2b3ca93

Please sign in to comment.