-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
When the value is "0", evaluate().valueOf() becomes a stringed expression instead of a result (confirmed for "GreaterEqual"):
let math = ["GreaterEqual", "count", 4]
ce.defineSymbol("count", {value: 0})
let expr = ce.box(math)
console.log(expr.evaluate().valueOf()) // "[\"LessEqual\",4,\"countLocal\"]"
When value is anything other than "0" evaluate().valueOf() works as expected:
let math = ["GreaterEqual", "count", 4]
ce.defineSymbol("count", {value: 0.000000001})
let expr = ce.box(math)
console.log(expr.evaluate().valueOf()) // false
This is also an issue with the newer assignValue()
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working