From bb230d0ac266293ec3d87ab7e818ca9e33e9723e Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Mon, 2 Mar 2015 13:35:02 +0200 Subject: [PATCH] fix race condition in tests --- src/layer/tile/GridLayer.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/layer/tile/GridLayer.js b/src/layer/tile/GridLayer.js index 7fa06dcb..d98994f3 100644 --- a/src/layer/tile/GridLayer.js +++ b/src/layer/tile/GridLayer.js @@ -552,6 +552,8 @@ L.GridLayer = L.Layer.extend({ }, _tileReady: function (coords, err, tile) { + if (!this._map) { return; } + if (err) { this.fire('tileerror', { error: err,