guard against possibly undefined team data in 'setPadMetadata'

pull/1/head
ansuz 3 years ago
parent 036248a659
commit e4879b5117

@ -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) {

Loading…
Cancel
Save