guard against type error when pinning channels of shared folders

master
ansuz 3 years ago
parent feefd9bff0
commit 0d50a698ac

@ -1263,8 +1263,12 @@ define([
} }
if (type === "pin") { if (type === "pin") {
var sfChannels = Object.keys(Env.folders).map(function (fId) { var sfChannels = Object.keys(Env.folders).map(function (fId) {
return Env.user.proxy[UserObject.SHARED_FOLDERS][fId].channel; try {
}); return Env.user.proxy[UserObject.SHARED_FOLDERS][fId].channel;
} catch (err) {
console.error(err);
}
}).filter(Boolean);
Array.prototype.push.apply(result, sfChannels); Array.prototype.push.apply(result, sfChannels);
} }

Loading…
Cancel
Save