loleaflet/src/core/Socket.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit c6b122c14d300d6314de3592381792064c7aea34 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Tue Jul 28 13:40:16 2020 +0200 Commit: Szymon Kłos <szymon.k...@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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits