eval node - fix interpolation

This commit is contained in:
Michal Kolář
2023-04-26 11:16:35 +02:00
committed by Stanislav Fifik
parent 49ad3a74e8
commit f2cce24587

View File

@@ -56,13 +56,9 @@ export default class NumberBinaryOperation extends Node<typeof inputs, typeof ou
} }
interpolate() { interpolate() {
return this.in.formula.value.replace(/\{(\w+)\}/g, (_, paramName) => { return this.in.formula.value.replace(/\{(\w+)\}/g, (_, paramName) =>
const value = get(this.in, [paramName, 'value']); get(this.in, [paramName, 'value'], 0)
if (value) { )
return value;
}
return '';
})
} }
evaluate() { evaluate() {