Skip to content

Supporting negative numbers in RHS of selection expression #33

Open
@hboon

Description

@hboon

I was adding a dummy selection so it can be used to trigger early-loading that attribute (points). So I wrote this:

<ts:selection name="dummyForcePointsToLoadAlwaysFalse" filter="points>-1">

But the expression parsing code at

const matches = filter.match(/([a-zA-Z0-9]*)([=<>]*)([a-zA-Z0-9]*)/);
doesn't handle negative numbers on the RHS.

const matches = filter.match(/([a-zA-Z0-9]*)([=<>]*)([a-zA-Z0-9]*)/);

It'll assign an empty string to conditionValue.

It's a uint though, so I'm not sure we'll ever have negative numbers, or will we?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions