Prevent autoRefresh from running when editing an item

master
Ramzan 4 years ago committed by Tom Hacohen
parent eb199c53c3
commit 205d7a3e1b

@ -282,7 +282,11 @@ class App extends React.PureComponent {
} }
private autoRefresh() { private autoRefresh() {
if (navigator.onLine && this.props.credentials) { this.refresh() } if (navigator.onLine && this.props.credentials &&
!(window.location.pathname.match(/.*\/(new|edit|copy)$/))) {
this.refresh();
}
} }
componentDidMount() { componentDidMount() {

Loading…
Cancel
Save