From e4879b5117bddad4eff86ac7dc7fee6346bc4a16 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 12 Aug 2021 19:15:52 +0530 Subject: [PATCH] guard against possibly undefined team data in 'setPadMetadata' --- www/common/outer/async-store.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index c4702727d..130926e6a 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -2159,6 +2159,8 @@ define([ if (!data.channel) { return void cb({ error: 'ENOTFOUND'}); } if (!data.command) { return void cb({ error: 'EINVAL' }); } var s = getStore(data.teamId); + if (!s) { return void cb({ error: 'ENOTFOUND' }); } + var otherChannels = data.channels; delete data.channels; s.rpc.setMetadata(data, function (err, res) {