fix: prevent throwing when LatLng is non-finite#2182
fix: prevent throwing when LatLng is non-finite#2182JaffaKetchup merged 7 commits intofleaflet:masterfrom
LatLng is non-finite#2182Conversation
|
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. |
|
@JaffaKetchup Had to fix unrelated code too, because of But the build fails because of too strict parameters. |
|
@JaffaKetchup I've just "fixed" the score part: we now expect the top score - 10. |
|
Annoyingly, we do support WASM. I'll write a PR to remove logger and replace with logging. |
LatLng is non-finite & fix analysis warnings
Thank you @JaffaKetchup! For the record in the current PR I also fixed issues for score 160, beyond using logger. Feel free to find inspiration here. |
This reverts commit a474de1.
LatLng is non-finite & fix analysis warningsLatLng is non-finite
|
Thanks, yeah all fixed there. I reverted those unrelated changes here as well. Unfortunately we still don't get 160 points due to dart-lang/pana#1571 -> dart-lang/pub-dev#6785 (comment). Should be good to merge now, thanks again! |
|
@JaffaKetchup As far as I can see, we're only using |
|
Yeah, it's an option, but not ideal. I'll see where dart-lang/http#1887 goes first - probably nowhere fast though! Might have to copy it anyway... |
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?
The code isn't bullet proof as developers may extend
Crsdifferently, but in most cases that should work.And it's good enough.