diff --git a/frontend/src/component/feature/strategy/strategies-list-component.jsx b/frontend/src/component/feature/strategy/strategies-list-component.jsx index cc49269a47..c7379b1697 100644 --- a/frontend/src/component/feature/strategy/strategies-list-component.jsx +++ b/frontend/src/component/feature/strategy/strategies-list-component.jsx @@ -82,8 +82,14 @@ const StrategiesList = props => { setDelStrategy(index); }; - const removeStrategy = () => { + const removeStrategy = async () => { + const strategy = editableStrategies[delStrategy]; + + if (!strategy.new) { + await props.saveStrategies(props.configuredStrategies.filter((_, i) => i !== delStrategy)); + } updateEditableStrategies(editableStrategies.filter((_, i) => i !== delStrategy)); + setDelStrategy(undefined); setShowDelDialog(null); };