From a25e3ba223a6dd06eab33448b45d83da79525d20 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 30 May 2021 16:46:21 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20conditions=20not=20able=20?= =?UTF-8?q?to=20be=20deleted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nest_frontend/components/providers/RepositoryEditor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nest_frontend/components/providers/RepositoryEditor.js b/nest_frontend/components/providers/RepositoryEditor.js index 5ac49ef..ab89522 100644 --- a/nest_frontend/components/providers/RepositoryEditor.js +++ b/nest_frontend/components/providers/RepositoryEditor.js @@ -32,14 +32,14 @@ export default function RepositoryEditor({ const [_name, setName] = useState(name ?? "") /** The conditions of the data gathering. */ + const parsedConditions = conditions.map(cond => Condition.fromRaw(cond)) const { - value: rawConditions, + value: _conditions, setValue: setRawConditions, appendValue: appendRawCondition, removeValue: removeRawCondition, spliceValue: spliceRawCondition, - } = useArrayState(conditions) - const _conditions = rawConditions.map(cond => Condition.fromRaw(cond)) + } = useArrayState(parsedConditions) /** The operator the conditions should be evaluated with. */ const [_evaluationMode, setEvaluationMode] = useState(evaluationMode ?? 0)