summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-07-28 13:40:16 +0200
committerAndras Timar <andras.timar@collabora.com>2020-09-09 14:50:56 +0200
commitce7c5eb6bf2fcdd426ec672a5eb3086c4478ddac (patch)
treed0d46045819e7abccc786c15524b8ef6d32ccb94
parent621f2f463e37aab78e9974ccc2a13d39c6f4d2f8 (diff)
Avoid usage of null variable
Change-Id: I2e428baaef22094c40d316ea31a11bdf626af2d0 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99612 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--loleaflet/src/core/Socket.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 9f48d3145..3d36cfcb6 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);