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

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Sat Aug 17 01:39:51 UTC 2019


 loleaflet/src/core/Socket.js |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 74e28ad711f6d18e9ccb96a6c35ab0dd7f19475b
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sat Mar 30 12:15:09 2019 -0400
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Sat Aug 17 03:39:32 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.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/71089
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index ddb23f24b..e676b724a 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -509,12 +509,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;
 		}


More information about the Libreoffice-commits mailing list