Explicitly pass empty string into pushState and replaceState

Legacy edge appears to interpet a missing third parameter as the string "undefined"
Brilliant.
This commit is contained in:
Thomas Weber committed 2021-04-08 19:34:09 -05:00
1 parent b0cf4efcc4
commit de15e68e79
1 file changed
+2 -2
+2 -2
View File
@@ -38,8 +38,8 @@ class Modal extends React.Component {
return `modal-${this.props.id}`;
}
pushHistory (state, push) {
if (push) return history.pushState(state, this.id);
history.replaceState(state, this.id);
if (push) return history.pushState(state, this.id, '');
history.replaceState(state, this.id, '');
}
render () {
return <ModalComponent {...this.props} />;