Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly parseFloat in formattedNumber #747

Merged
merged 1 commit into from
Aug 15, 2017
Merged

Explicitly parseFloat in formattedNumber #747

merged 1 commit into from
Aug 15, 2017

Conversation

jbccollins
Copy link

@jbccollins
Copy link
Author

This issue would occur when n was "0.0". JavaScript's weakly typed derpyness is bleh.

@ddproxy ddproxy merged commit a539be5 into Leaflet:master Aug 15, 2017
@stefan2420
Copy link

In leaflet.geometryutil.js I changed the code. Where it was distance.toFixed or distanceStr.toFixed I changed it to parseFloat(distance).toFixed(2) or parseFloat(distanceStr).toFixed(2). Seems to have solved my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants