Skip to content

Commit 3f4e969

Browse files
committed
push history on modal mount, if current history ref is not this same component id
1 parent b3e97ad commit 3f4e969

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/containers/modal.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Modal extends React.Component {
1919
componentDidMount () {
2020
// Add a history event only if it's not currently for our modal. This
2121
// avoids polluting the history with many entries. We only need one.
22-
this.pushHistory(this.id, history.state === null);
22+
this.pushHistory(this.id, (history.state === null || history.state !== this.id));
2323
}
2424
componentWillUnmount () {
2525
this.removeEventListeners();

0 commit comments

Comments
 (0)