From 91f086d72c2bb70dea289de83a44075e48048dbc Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 9 Feb 2021 14:00:29 +0100 Subject: [PATCH] Update EditChannels.plugin.js --- Plugins/EditChannels/EditChannels.plugin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Plugins/EditChannels/EditChannels.plugin.js b/Plugins/EditChannels/EditChannels.plugin.js index 86ab14b12b..5b204bdefd 100644 --- a/Plugins/EditChannels/EditChannels.plugin.js +++ b/Plugins/EditChannels/EditChannels.plugin.js @@ -333,12 +333,13 @@ module.exports = (_ => { } else if (settings.changeInSearchPopout && e.returnvalue.props.className.indexOf(BDFDB.disCN.searchpopoutoption) > -1) { change = true; - channelId = (BDFDB.ReactUtils.findValue(e.returnvalue._owner, "result", {up: true}) || {channel: {}}).channel.id; + let channel = (BDFDB.ReactUtils.findValue(e.returnvalue._owner, "result", {up: true}) || {}).channel; + channelId = channel && channel.id; nameClass = BDFDB.disCN.searchpopoutresultchannel; categoyClass = BDFDB.disCN.searchpopoutsearchresultchannelcategory; iconClass = BDFDB.disCN.searchpopoutsearchresultchannelicon; } - if (change) { + if (change && channelId) { if (changedChannels[channelId]) { let name = nameClass && BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", nameClass]]}); if (name) {