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

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue Jul 28 12:51:01 UTC 2020


 loleaflet/src/core/Socket.js |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit c6b122c14d300d6314de3592381792064c7aea34
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Jul 28 13:40:16 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Jul 28 14:50:42 2020 +0200

    Avoid usage of null variable
    
    Change-Id: I2e428baaef22094c40d316ea31a11bdf626af2d0
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99592
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 33f73f6fc..7955429e7 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -314,7 +314,9 @@ L.Socket = L.Class.extend({
 		}
 		else if (textMsg.startsWith('osinfo ')) {
 			var osInfo = textMsg.replace('osinfo ', '');
-			document.getElementById('os-info').innerText = osInfo;
+			var osInfoElement = document.getElementById('os-info');
+			if (osInfoElement)
+				osInfoElement.innerText = osInfo;
 		}
 		else if (textMsg.startsWith('clipboardkey: ')) {
 			var key = textMsg.substring('clipboardkey: '.length);


More information about the Libreoffice-commits mailing list