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
As we know, JavaScript is weakly typed, and it's not uncommon to end up with numeric data that is in String format. In particular, the native <input> returns only String value, even when set to type="Number".
Whenever possible, it's useful for components to liberally accept Strings where numeric data is required, and perform conversion and the point of requirement.
In this case, the _updateCenter method throws if the latitude or longitude properties are not Number type. It will improve ergonomics if we first cast those properties to Number before checking for isNaN.
The text was updated successfully, but these errors were encountered:
As we know, JavaScript is weakly typed, and it's not uncommon to end up with numeric data that is in String format. In particular, the native
<input>
returns only Stringvalue
, even when set totype="Number"
.Whenever possible, it's useful for components to liberally accept Strings where numeric data is required, and perform conversion and the point of requirement.
In this case, the
_updateCenter
method throws if thelatitude
orlongitude
properties are not Number type. It will improve ergonomics if we first cast those properties to Number before checking forisNaN
.The text was updated successfully, but these errors were encountered: