From 6b904a19046312bd0e06f0ddbd6ffd371d1efb52 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sat, 5 Nov 2022 00:44:21 +0100 Subject: [PATCH] Update EditChannels.plugin.js --- Plugins/EditChannels/EditChannels.plugin.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Plugins/EditChannels/EditChannels.plugin.js b/Plugins/EditChannels/EditChannels.plugin.js index de6c1d7875..62d9a0c18b 100644 --- a/Plugins/EditChannels/EditChannels.plugin.js +++ b/Plugins/EditChannels/EditChannels.plugin.js @@ -2,7 +2,7 @@ * @name EditChannels * @author DevilBro * @authorId 278543574059057154 - * @version 4.4.3 + * @version 4.4.4 * @description Allows you to locally edit Channels * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -487,10 +487,11 @@ module.exports = (_ => { let getChannelFromSectionRow = e.instance.props.guildChannels.getChannelFromSectionRow.bind(e.instance.props.guildChannels); e.instance.props.guildChannels.getChannelFromSectionRow = BDFDB.TimeUtils.suppress((...args) => { let returnValue = getChannelFromSectionRow(...args); - if (returnValue.channel && returnValue.category) returnValue = Object.assign({}, returnValue, { - channel: Object.assign({}, returnValue.channel, {record: this.getChannelData(returnValue.channel.record.id)}), - category: Object.assign({}, returnValue.category, {record: this.getChannelData(returnValue.category.record.id)}) - }); + if (returnValue.channel && returnValue.category) { + returnValue = Object.assign({}, returnValue); + returnValue.channel.record = this.getChannelData(returnValue.channel.record.id); + returnValue.category.record = this.getChannelData(returnValue.category.record.id); + } return returnValue; }, "Error in getChannelFromSectionRow of ChannelsList!", this); }