loleaflet/src/core/Socket.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
New commits: commit ad7aa46c12e0711ee0b3c282e788cadf0745cff9 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> AuthorDate: Sat Mar 30 12:15:09 2019 -0400 Commit: Jan Holesovsky <ke...@collabora.com> CommitDate: Tue Apr 9 12:33:43 2019 +0200 leaflet: suppress empty error messages This also adds support to suppress errors by setting their message to blank. Change-Id: I2baabd121afb59c48e950b139f984c64d1720512 Reviewed-on: https://gerrit.libreoffice.org/70032 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Michael Meeks <michael.me...@collabora.com> diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 85c459c0f..b21a3b496 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -547,12 +547,15 @@ L.Socket = L.Class.extend({ return; } - // Parse the storage url as link - var tmpLink = document.createElement('a'); - tmpLink.href = this._map.options.doc; - // Insert the storage server address to be more friendly - storageError = storageError.replace('%storageserver', tmpLink.host); - this._map.fire('warn', {msg: storageError}); + // Skip empty errors (and allow for suppressing errors by making them blank). + if (storageError != '') { + // Parse the storage url as link + var tmpLink = document.createElement('a'); + tmpLink.href = this._map.options.doc; + // Insert the storage server address to be more friendly + storageError = storageError.replace('%storageserver', tmpLink.host); + this._map.fire('warn', {msg: storageError}); + } return; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits