You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing values as strings instead of numbers will produce unexpected results, due to Javascript string handling.
The inputs (lat, lng, code length) should be coerced to numbers (using Number()) and if it produces NaN throw an exception.
While you're there, adding an exported constant for the code length e.g. OpenLocationCode.CODE_PRECISION_NORMAL and OpenLocationCode.CODE_PRECISION_EXTRA seems like a good idea.
The text was updated successfully, but these errors were encountered:
Passing values as strings instead of numbers will produce unexpected results, due to Javascript string handling.
The inputs (lat, lng, code length) should be coerced to numbers (using Number()) and if it produces NaN throw an exception.
While you're there, adding an exported constant for the code length e.g. OpenLocationCode.CODE_PRECISION_NORMAL and OpenLocationCode.CODE_PRECISION_EXTRA seems like a good idea.
The text was updated successfully, but these errors were encountered: