From 5b647c307d35b445df9a5d3121a16dc92000bfa8 Mon Sep 17 00:00:00 2001 From: camila314 <47485054+camila314@users.noreply.github.com> Date: Sat, 25 Nov 2023 11:48:10 -0600 Subject: [PATCH] fix small crash bug --- src/plugins/keywordNotify/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/keywordNotify/index.tsx b/src/plugins/keywordNotify/index.tsx index b92ec5c46..4133ffe5c 100644 --- a/src/plugins/keywordNotify/index.tsx +++ b/src/plugins/keywordNotify/index.tsx @@ -232,6 +232,9 @@ export default definePlugin({ dismissible: true }); + if (msg == null) + return [null]; + msg.props.children[0].props.children.props.onClick = () => onDelete(e); msg.props.children[1].props.children[1].props.message.customRenderedContent = { content: highlightKeywords(e.content, regexes)