loleaflet/src/layer/marker/Annotation.js | 1 + 1 file changed, 1 insertion(+)
New commits: commit 7e2929674a772046774ae2825abf72b94353a0e3 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Thu Aug 13 09:41:05 2020 +0200 Commit: Andras Timar <andras.ti...@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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Jan Holesovsky <ke...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101021 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.ti...@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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits