[Libreoffice-commits] online.git: Branch 'distro/collabora/milestone-4' - loleaflet/src
Mihai Varga
mihai.varga at collabora.com
Fri Aug 14 05:08:56 PDT 2015
loleaflet/src/control/Control.js | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit cc98e57cb5dcede1af5e693e1236fbf2598a0ed8
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