[Libreoffice-commits] online.git: loleaflet/src

Mihai Varga mihai.varga at collabora.com
Fri Aug 14 05:07:57 PDT 2015


 loleaflet/src/control/Control.js |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 54fe0dac95993962953934ff7b0cb4924e21ef1e
Author: Mihai Varga <mihai.varga at 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 () {


More information about the Libreoffice-commits mailing list