diff options
author | Jan Holesovsky <kendy@collabora.com> | 2019-06-19 09:48:54 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-06-20 14:13:29 +0200 |
commit | 22720ee7d12b2d4567567f59a367251ba5f1f721 (patch) | |
tree | 103b9658665d541cf25069cf934b63390e0b6806 /loleaflet/js/global.js | |
parent | f485b2ea978f1ba508ae0395d0158693f398c7fa (diff) |
Avoid a TypeError.
I've been getting this on Android, but suspect it can be a general
problem:
loleaflet.html?file_path=/storage/emulated/0/Documents/untitled.odt&closebutton=1&permission=edit:165 Uncaught TypeError: Right-hand side of 'instanceof' is not an object
at global.FakeWebSocket.global.socket.onmessage (loleaflet.html?file_path=/storage/emulated/0/Documents/untitled.odt&closebutton=1&permission=edit:165)
at <anonymous>:1:25
Change-Id: Ifa6a6b15843e0c8235b920cea07324db59282074
Diffstat (limited to 'loleaflet/js/global.js')
-rw-r--r-- | loleaflet/js/global.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js index 344ada470..c1d6b9f9e 100644 --- a/loleaflet/js/global.js +++ b/loleaflet/js/global.js @@ -127,7 +127,7 @@ } global.socket.onmessage = function (event) { - if (global.L && global.socket instanceof global.L.Socket) { + if (typeof global.socket._onMessage === 'function') { global.socket._onMessage(event); } else { global.queueMsg.push(event.data); |