question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bugfix #6025 introduces exception in GridLayer._tileReady - a parameter check is missing

See original GitHub issue

Leaflet 1.3.2/1.3.3 has a fix that does not check a parameter for null/undefined and crashes in my scenario because GridLayer._tileReady(coords, err, tile) gets called with tile = null.

By fix #6025 GridLayer.js line 845 is changed to: if (!this._map || tile.getAttribute('src') === Util.emptyImageUrl) { return; } but tile is not checked. I propose fixing this by if (!this._map || (tile && tile.getAttribute('src') === Util.emptyImageUrl)) { return; }

I fear I can’t give a fiddle because I have a complicated scenario involving a subclassed leaflet.vectorgrid. The code worked fine with Leaflet 1.3.1 that didn’t have the second condition in the if statement.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:5

github_iconTop GitHub Comments

4reactions
mo-ian-watkinscommented, Jul 20, 2018

I concur with this, same situation, running Leaflet 1.3.3 with Leaflet.VectorGrid.

Works fine in 1.3.1 and 1.2.0

3reactions
ashleysommercommented, Aug 10, 2018

Any idea if there will be a release soon incorporating this fix?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found