Fix serverConnection not defined in ServerConnection.findByLocalId

This commit is contained in:
Alexandre Iooss authored and Juliusz Chroboczek committed 2021-04-27 11:11:17 +02:00
1 parent 170f510adc
commit 4db8279016
1 file changed
+5 -4
+5 -4
View File
@@ -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;