Prevent conversion of native number params to Scientific Notation #160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
@alxndrsn Seeing as you commented on the issue, what do you think?
@yanokwa Do you have a minute to review this change before we merge? |
@garethbowen LGTM. I think it also closes enketo/enketo#896 |
@yanokwa @eyelidlessness I think this is good to go. Are you happy for this to be merged, and a new release being published? We're hoping to include this in a release in the next couple of weeks. |
Happy for it to be merged and released. Do you also need a core release to be able to use it? We've been heads down in Express and weren't planning to release the other tools for another 3ish weeks but could possibly revise that. |
@lognaturel no, we should not need enketo-core to be released. The new version of openrosa should be compatible with our current version of enketo-core. |
@lognaturel I'm happy to do the merge and release, but I don't think I have the npm permissions required to do the actual publish. Would you mind helping out either by doing the publish, or granting me permissions on npm? |
Will try to do by middle of next week. |
It's out. |
Thanks a ton @lognaturel! This is very helpful! We will be pulling in the new release this week. |
Updates the processing of native function parameters to set a fix number of fractional digits (
20
) to include after the decimal point when appending the number value to the native function string. This will prevent JavaScript from representing numbers with many fractional digits using Scientific Notation (which causes an error in some native XPath functions).I believe that currently only the native
ceiling
andfloor
functions are affected since they are the only supported native functions that accept number parameters.Closes enketo/enketo#863