From 4db8279016140762240ccc60acf9e9fce533e795 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sat, 24 Apr 2021 14:51:14 +0200 Subject: [PATCH] Fix serverConnection not defined in ServerConnection.findByLocalId --- static/protocol.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/static/protocol.js b/static/protocol.js index ae1846b..f38882c 100644 --- a/static/protocol.js +++ b/static/protocol.js @@ -410,14 +410,15 @@ ServerConnection.prototype.request = function(what) { * @param {string} localId * @returns {Stream} */ - ServerConnection.prototype.findByLocalId = function(localId) { if(!localId) return null; - for(let id in serverConnection.up) { - let s = serverConnection.up[id]; - if(s.localId == localId) + let sc = this; + + for(let id in sc.up) { + let s = sc.up[id]; + if(s.localId === localId) return s; } return null;