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

New commits:
commit 74e28ad711f6d18e9ccb96a6c35ab0dd7f19475b
Author:     Ashod Nakashian <ashod.nakash...@collabora.co.uk>
AuthorDate: Sat Mar 30 12:15:09 2019 -0400
Commit:     Ashod Nakashian <ashnak...@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.me...@collabora.com>
    Tested-by: Michael Meeks <michael.me...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/71089
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@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;
                }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to