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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Jan 30 16:08:32 UTC 2019


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

New commits:
commit dca0a126f343f19f2c1fc0bb601c9108d7bf2c30
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Jan 30 17:04:15 2019 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Jan 30 17:06:24 2019 +0100

    Check if annotation exists before use
    
    Change-Id: I79204a8baeaa7b2896b153475cde2ba873b28738

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index a2c710eb5..fe40b2dd8 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -273,7 +273,8 @@ L.Map = L.Evented.extend({
 			for (var idxAnno in this._docLayer._annotations._items) {
 				var annotation = this._docLayer._annotations._items[idxAnno];
 				var username = annotation._data.author;
-				annotation._data.avatar = this._viewInfoByUserName[username].userextrainfo.avatar;
+				if (this._viewInfoByUserName[username])
+					annotation._data.avatar = this._viewInfoByUserName[username].userextrainfo.avatar;
 				annotation._updateContent();
 			}
 		}


More information about the Libreoffice-commits mailing list