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 = '';