From e3b823155d71fdd5dc05f20492e50b406d8dd7a2 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 17 Feb 2021 14:54:33 +0100 Subject: [PATCH] Guard against synchronous waitFor --- www/common/outer/team.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/outer/team.js b/www/common/outer/team.js index 587d3e8e6..04c5b8916 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -398,7 +398,8 @@ define([ }; - var checkTeamChannels = function (ctx, id, channel, roster, waitFor, cb) { + var checkTeamChannels = function (ctx, id, channel, roster, waitFor, _cb) { + var cb = Util.once(Util.mkAsync(_cb)); var close = function () { if (ctx.cache[id] || ctx.teams[id]) { closeTeam(ctx, id); } delete ctx.store.proxy.teams[id];