From e7e27da9f9f2ff795b9718bf8f83947c55ce6a67 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 17 Feb 2021 14:58:40 +0100 Subject: [PATCH] Fix previous commit --- www/common/outer/team.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/www/common/outer/team.js b/www/common/outer/team.js index 04c5b8916..271d39bd3 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -398,8 +398,7 @@ define([ }; - var checkTeamChannels = function (ctx, id, channel, roster, waitFor, _cb) { - var cb = Util.once(Util.mkAsync(_cb)); + var checkTeamChannels = function (ctx, id, channel, roster, waitFor, cb) { var close = function () { if (ctx.cache[id] || ctx.teams[id]) { closeTeam(ctx, id); } delete ctx.store.proxy.teams[id]; @@ -1933,7 +1932,7 @@ define([ if (closed) { return; } var team = ctx.store.proxy.teams[id]; var rosterChan = Util.find(team, ['keys', 'roster', 'channel']); - var _cb = waitFor(); + var _cb = Util.once(Util.mkAsync(waitFor())); nThen(function (w) { checkTeamChannels(ctx, id, team.channel, rosterChan, w, _cb); });