Guard against synchronous waitFor

pull/1/head
yflory 2021-02-17 14:54:33 +01:00
parent 794589ac7e
commit e3b823155d
1 changed files with 2 additions and 1 deletions

View File

@ -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];