From 0d50a698ac60c687a47da0946b8359bbc01deeec Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 30 May 2022 15:36:13 +0530 Subject: [PATCH] guard against type error when pinning channels of shared folders --- www/common/proxy-manager.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/www/common/proxy-manager.js b/www/common/proxy-manager.js index 926335eb9..b4c985dc9 100644 --- a/www/common/proxy-manager.js +++ b/www/common/proxy-manager.js @@ -1263,8 +1263,12 @@ define([ } if (type === "pin") { 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); }