Skip to content

Script.Value does not do what it says it does #358

Open
@dlev-

Description

@dlev-

Script.Value gets translated to || in js. || does a truthyness test on values, but the Script.Value documentation says "Gets the first valid (non-null, non-undefined, non-empty) value."
Here's example code;

bool foo = false;
bool bar = Script.Value(foo, true);

Since foo is not null or undefined, I would expect bar to be false, but as Script.Value is currently translated it will be true. Based on the name of the function, and the documentation, I would expect Script.Value to return the value of the first argument that passes the test of Script.IsValue

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions