mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 08:25:19 +01:00
fix expression evaluation
This commit is contained in:
parent
e7c6a79f49
commit
8061fdc54d
1 changed files with 3 additions and 4 deletions
|
|
@ -31,10 +31,7 @@ export function activate(ctx: ApplicationContext) {
|
|||
}
|
||||
let value = table$.value[expr];
|
||||
if (value === undefined) {
|
||||
value = parseFloat(expr);
|
||||
if (isNaN(value)) {
|
||||
value = _evaluateExpression(expr);
|
||||
}
|
||||
value = _evaluateExpression(expr);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
|
@ -58,6 +55,8 @@ export function activate(ctx: ApplicationContext) {
|
|||
};
|
||||
|
||||
table$.attach(() => ctx.expressionService.signature = Date.now() + '');
|
||||
|
||||
load('');
|
||||
}
|
||||
|
||||
function rebuildVariableTable(script) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue