diff --git a/src/equicordplugins/messagePeek/index.tsx b/src/equicordplugins/messagePeek/index.tsx index 294a9cf9..ceaa4261 100644 --- a/src/equicordplugins/messagePeek/index.tsx +++ b/src/equicordplugins/messagePeek/index.tsx @@ -41,10 +41,11 @@ export default definePlugin({ replacement: { match: /(?<=children:([^])[^]*)}\);/, replace: `$& + if ($1[0] && $1[0].props && $1[0].props.children) { $1[0].props.children[1].props.children=[ $1[0].props.children[1].props.children, $self.renderMessagePeek({ channel: $1[0].props.children[0].props.channel }) - ];`.replace(/\s+/g, "") + ];};`.replace(/\s+/g, "") }, predicate: () => settings.store.guildChannels === true }