opengovsg / checkfirst

Don't Know? CheckFirst. A tool to build eligibility checkers and calculators for Singapore Government policies
https://checkfirst.gov.sg
Other
11 stars 6 forks source link

fix: coerce output to number if numeric #1407

Closed LoneRifle closed 1 year ago

LoneRifle commented 1 year ago

Problem

Numeric string outputs are considered numeric and passed to math.format(), which adds double quotes

Solution

If an output value is considered numeric, coerce it to a Number