From 4d4a01b6a22e493d460cd0439d8fb26a725aba72 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 1 Mar 2021 11:57:59 -0500 Subject: [PATCH] ui: resolve race condition in ATT&CK configuration page --- .../monkey_island/cc/ui/src/components/pages/ConfigurePage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js index 2f82ae30c..46303198a 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js @@ -130,8 +130,8 @@ class ConfigurePageComponent extends AuthComponent { .then(() => { this.setInitialAttackConfig(this.state.attackConfig); }) - .then(this.updateConfig()) - .then(this.setState({lastAction: 'saved'})) + .then(() => this.updateConfig()) + .then(() => this.setState({lastAction: 'saved'})) .catch(error => { console.log('Bad configuration: ' + error.toString()); this.setState({lastAction: 'invalid_configuration'});