diff options
Diffstat (limited to 'ui/src/components/main.tsx')
-rw-r--r-- | ui/src/components/main.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx index 48df1edd..cce31fce 100644 --- a/ui/src/components/main.tsx +++ b/ui/src/components/main.tsx @@ -106,11 +106,12 @@ export class Main extends Component<any, MainState> { // Necessary for back button for some reason componentWillReceiveProps(nextProps: any) { - if (nextProps.history.action == 'POP') { + if (nextProps.history.action == 'POP' || nextProps.history.action == 'PUSH') { this.state = this.emptyState; this.state.type_ = this.getListingTypeFromProps(nextProps); this.state.sort = this.getSortTypeFromProps(nextProps); this.state.page = this.getPageFromProps(nextProps); + this.setState(this.state); this.fetchPosts(); } } |