Commit 4c17bec2 authored by Tomáš Pecka's avatar Tomáš Pecka

webui: reset templateParams when updating GhostNode from special nodes

We encountered a bug #39 that caused DotConverter to fail sometimes.
After debugging backend we noticed that DotConverter is trying to be
evaulated with templateParams 'automaton::Automaton' which was weird.
(It could be also noticed from the JSONs sent to backends, but I was
super blind.)

After some messing with the frontend it seemed that DotOutput node (when
put) on the canvas already has the templateParams set wrong. It seemed
that this happens only when putting it on the canvas after a node that
has templateParams specified (like string::Parse).

The solution is therefore to set templateParams to empty before putting
any special node on canvas.

Closes #39.
parent 514b3b22
......@@ -61,7 +61,8 @@ export const AlgorithmDrawer = () => {
params,
resultType,
height: 75,
value
value,
templateParams: [],
})
)
dispatch(setBuildNode(true))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment