fixed an error at uninitialized layer container

This commit is contained in:
Dino Ravnić 2011-08-10 20:18:28 +01:00
parent 061f3d6832
commit 56382fcefd

View File

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