LHNCBC / lforms

See the project website at http://lhncbc.github.io/lforms/, or view the demo website at https://lhcforms.nlm.nih.gov/lhcforms.
Other
99 stars 55 forks source link

0 value for number types in response is ignored #135

Closed Harown closed 9 months ago

Harown commented 9 months ago

Given:

A questionnaire with an integer question and a response with value 0.

Expected:

Calling mergeFHIRDataIntoLForms renders the 0 into the question input.

Actual:

Calling mergeFHIRDataIntoLForms ignores the 0 and puts nothing into the question input.

Tested version:

Fiddle: https://jsfiddle.net/axk57f4L/1/ You can set the valueInteger to any integer - works ... but not for 0.

This is not restricted to integer types but also to decimal and maybe some more number types.

Is this a bug or intended behaviour?

Thanks!

lhcye commented 9 months ago

It is indeed a bug. It's fixed in the next version, which will be releases soon.

lhcye commented 9 months ago

It is fixed in v34.0.3.

Harown commented 9 months ago

Great, thank you for the quick fix.