Denormalised inline calculations to property documents, needs to be referenced by UI still

This commit is contained in:
Stefan Zermatten
2021-01-29 12:29:01 +02:00
parent 9c799e3dc9
commit 1167538977
25 changed files with 360 additions and 118 deletions

View File

@@ -28,6 +28,13 @@ export default function evaluateCalculation(string, memo, fn = 'reduce'){
dependencies,
};
}
if (!calc){
return {
context: {errors},
result: new ConstantNode({value: calc, type: 'string'}),
dependencies,
};
}
// Ensure all symbol nodes are defined and computed
calc.traverse(node => {
if (node instanceof SymbolNode || node instanceof AccessorNode){