From 56382fcefd400c09f966da2ae6c639cebe51f9ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dino=20Ravni=C4=87?= Date: Wed, 10 Aug 2011 20:18:28 +0100 Subject: [PATCH] fixed an error at uninitialized layer container --- src/layer/tile/TileLayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layer/tile/TileLayer.js b/src/layer/tile/TileLayer.js index 996a528f..5b458229 100644 --- a/src/layer/tile/TileLayer.js +++ b/src/layer/tile/TileLayer.js @@ -113,7 +113,7 @@ L.TileLayer = L.Class.extend({ _reset: function(clearOldContainer) { this._tiles = {}; - if (clearOldContainer) + if (clearOldContainer && this._container) this._container.innerHTML = ""; this._initContainer(); this._container.innerHTML = '';