Fix not recognizing channels after a recent Discord update

This commit is contained in:
chylex 2020-12-20 02:04:50 +01:00
parent dd4db0a9f9
commit 1977c9c961

View File

@ -126,13 +126,13 @@ var DISCORD = (function(){
channelListEle = document.getElementById("channels");
var channel = channelListEle.querySelector("[class*='modeSelected']").parentElement;
var props = DISCORD.getReactProps(channel);
var props = DISCORD.getReactProps(channel).children.props;
if (!props){
return null;
}
var channelObj = props.children.props.channel;
var channelObj = props.channel || props.children().props.channel;
if (!channelObj){
return null;