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

Pranav Kant pranavk at collabora.co.uk
Wed Apr 5 13:43:51 UTC 2017


 loleaflet/src/map/Map.js |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a3f93b880b5a7058b4144d6b0108bd57f29a8304
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Wed Apr 5 19:12:26 2017 +0530

    loleaflet: Fix loop which fetches view ids from username
    
    Change-Id: Ia4fcfcb83a040369474c6962ce2c67b44f3f1cb3

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 19b0576c..4b7e2c39 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -149,9 +149,9 @@ L.Map = L.Evented.extend({
 	// public methods that modify map state
 
 	getViewId: function (username) {
-		for (var id in this._viewInfo) {
-			if (this._viewInfo[id].username === username) {
-				return id;
+		for (var idx in this._viewInfo) {
+			if (this._viewInfo[idx].username === username) {
+				return this._viewInfo[idx].id;
 			}
 		}
 		return -1;


More information about the Libreoffice-commits mailing list