Skip to content

Commit

Permalink
fix: Fix alerts refreshing when an alert is being edited
Browse files Browse the repository at this point in the history
  • Loading branch information
aloysius-pgast committed Apr 20, 2021
1 parent 6d88210 commit ff7bc95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
### Gateway
* New optional config parameter `sessions.hideIpaddr` to hide ip addresses when listing sessions
* Accept _true_ & _false_ for boolean environment variables
### UI
* Fix alerts refreshing when an alert is being edited (*My Alerts*)

## [v1.9.0]
### Gateway
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/AlertEditor/AlertEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ componentWillReceiveProps(nextProps)
state.alert = {loaded:true, loadErr:null, saveErr:null, isWaiting:false, data:getEmptyAlert(this._hasPushover), newName:''};
}
this.setState(state, () => {
if (this.state.isVisible && 0 != this.state.id) {
if (this.state.isVisible && 0 != this.state.id && timestamp != this._timestamp) {
this._loadAlert(this.state.id);
}
});
Expand Down

0 comments on commit ff7bc95

Please sign in to comment.