loleaflet/src/control/Control.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit 54fe0dac95993962953934ff7b0cb4924e21ef1e Author: Mihai Varga <mihai.va...@collabora.com> Date: Fri Aug 14 15:06:10 2015 +0300 loleaflet: check if there are any controls before removing them diff --git a/loleaflet/src/control/Control.js b/loleaflet/src/control/Control.js index 65640ac..fe6021c 100644 --- a/loleaflet/src/control/Control.js +++ b/loleaflet/src/control/Control.js @@ -102,9 +102,11 @@ L.Map.include({ }, removeControls: function () { - this._controls.forEach(function (control) { - L.DomUtil.remove(control.div); - }); + if (this._controls) { + this._controls.forEach(function (control) { + L.DomUtil.remove(control.div); + }); + } }, _initControlPos: function () { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits