Skip to content

Comments

fix: throwing when LatLng is NaN#2182

Open
monsieurtanuki wants to merge 4 commits intofleaflet:masterfrom
monsieurtanuki:fix/2178
Open

fix: throwing when LatLng is NaN#2182
monsieurtanuki wants to merge 4 commits intofleaflet:masterfrom
monsieurtanuki:fix/2178

Conversation

@monsieurtanuki
Copy link
Contributor

Now we throw an Exception when a LatLng is NaN - at projection time.
Doesn't look particularly good, but at least we avoid a memory leak, and anyway, who put the NaN in the first place?
Image

The code isn't bullet proof as developers may extend Crs differently, but in most cases that should work.
And it's good enough.

@JaffaKetchup
Copy link
Member

Sorry for not responding sooner. Would it make sense to check if either number is not finite? Then we'll protect against infinities as well.

@monsieurtanuki
Copy link
Contributor Author

@JaffaKetchup Had to fix unrelated code too, because of parameter_assignments lint.

But the build fails because of too strict parameters.
We cannot reach a pub.dev score of 160/160, because we use Logger that only reaches 150 (doesn't officially support wasm).

@monsieurtanuki
Copy link
Contributor Author

@JaffaKetchup I've just "fixed" the score part: we now expect the top score - 10.

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.

2 participants