From 33bca8e3ba950a38dd52ff9cc7547b08ac51a19e Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 19 Dec 2024 20:47:21 +0100 Subject: [PATCH] fix typingTweaks --- src/plugins/typingTweaks/index.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/plugins/typingTweaks/index.tsx b/src/plugins/typingTweaks/index.tsx index ebe12b5d9..8b292c1fd 100644 --- a/src/plugins/typingTweaks/index.tsx +++ b/src/plugins/typingTweaks/index.tsx @@ -134,12 +134,11 @@ export default definePlugin({ let element = 0; return children.map(c => { + if (c.type !== "strong" && !(typeof c !== "string" && !React.isValidElement(c))) + return c; + const user = users[element++]; - - if (c.type === "strong" || (typeof c !== "string" && !React.isValidElement(c))) - return ; - - return c; + return ; }); } catch (e) { console.error(e);