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

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 19 20:53:08 UTC 2020


 loleaflet/src/layer/marker/Annotation.js |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7e2929674a772046774ae2825abf72b94353a0e3
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Aug 13 09:41:05 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Aug 19 22:52:50 2020 +0200

    When avatar fails to load use generic image
    
    Change-Id: I03659a75ed168b15483ef46677eae4989b734933
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100643
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101021
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js
index e11665af9..797c2d432 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -225,6 +225,7 @@ L.Annotation = L.Layer.extend({
 		imgAuthor.setAttribute('src', L.LOUtil.getImageURL('user.svg'));
 		imgAuthor.setAttribute('width', this.options.imgSize.x);
 		imgAuthor.setAttribute('height', this.options.imgSize.y);
+		imgAuthor.onerror = function () { imgAuthor.setAttribute('src', L.LOUtil.getImageURL('user.svg')); };
 		this._authorAvatarImg = imgAuthor;
 		this._authorAvatartdImg = tdImg;
 		this._contentAuthor = L.DomUtil.create(tagDiv, 'loleaflet-annotation-content-author', tdAuthor);


More information about the Libreoffice-commits mailing list