Prevent autoRefresh from running when editing an item

master
Ramzan 2020-07-17 19:31:21 -04:00 committed by Tom Hacohen
parent eb199c53c3
commit 205d7a3e1b
1 changed files with 5 additions and 1 deletions

View File

@ -282,7 +282,11 @@ class App extends React.PureComponent {
}
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() {