Skip to content
Snippets Groups Projects
Commit 3f4e9698 authored by Ben Wheeler's avatar Ben Wheeler
Browse files

push history on modal mount, if current history ref is not this same component id

parent b3e97adb
Branches
Tags 0.1.0-prerelease.20190718173935
No related merge requests found
...@@ -19,7 +19,7 @@ class Modal extends React.Component { ...@@ -19,7 +19,7 @@ class Modal extends React.Component {
componentDidMount () { componentDidMount () {
// Add a history event only if it's not currently for our modal. This // Add a history event only if it's not currently for our modal. This
// avoids polluting the history with many entries. We only need one. // avoids polluting the history with many entries. We only need one.
this.pushHistory(this.id, history.state === null); this.pushHistory(this.id, (history.state === null || history.state !== this.id));
} }
componentWillUnmount () { componentWillUnmount () {
this.removeEventListeners(); this.removeEventListeners();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment