Race condition bugfix

This commit is contained in:
VakarisZ 2019-05-27 17:31:10 +03:00
parent 8ecfb5d777
commit f4288f110c
1 changed files with 1 additions and 1 deletions

View File

@ -252,12 +252,12 @@ class ConfigurePageComponent extends AuthComponent {
} }
setSelectedSection = (key) => { setSelectedSection = (key) => {
this.updateConfigSection();
if ((key === 'attack' && this.userChangedConfig()) || if ((key === 'attack' && this.userChangedConfig()) ||
(this.currentSection === 'attack' && this.userChangedMatrix())){ (this.currentSection === 'attack' && this.userChangedMatrix())){
this.setState({showAttackAlert: true}); this.setState({showAttackAlert: true});
return; return;
} }
this.updateConfigSection();
this.currentSection = key; this.currentSection = key;
this.setState({ this.setState({
selectedSection: key selectedSection: key