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

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Wed Dec 11 10:14:04 UTC 2019


 loleaflet/src/layer/tile/TileLayer.js |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 85d72c400511ede4870104af8fa3ace46ec9ac5b
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Dec 10 19:15:59 2019 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Dec 11 11:13:28 2019 +0100

    jsdialog: correctly parse status of changed items
    
    Change-Id: I57384b07f6df5d2d3b0afd97ee47330644083f09
    Reviewed-on: https://gerrit.libreoffice.org/84889
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index e51b2f755..e7faca385 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1471,12 +1471,8 @@ L.TileLayer = L.GridLayer.extend({
 		var isPureJSON = textMsg.indexOf('=') === -1 && textMsg.indexOf('{') !== -1;
 		if (isPureJSON) {
 			var json = JSON.parse(textMsg);
-
-			for (var i = 0; i < json.items.length; i++) {
-				var item = json.items[i];
-				if (item.commandName && item.state) {
-					this._map.fire('commandstatechanged', item);
-				}
+			if (json.commandName && json.state) {
+				this._map.fire('commandstatechanged', json);
 			}
 		} else {
 			var index = textMsg.indexOf('=');


More information about the Libreoffice-commits mailing list