1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-10 09:56:24 +00:00

Revert "MessageLinkEmbeds: No longer need to reset global regex"

It is still needed for messageLinkRegex.test
This commit is contained in:
Nuckyz 2024-05-21 23:58:37 -03:00 committed by Luna
parent 47fe88a91c
commit 3a4d82c5cd

View file

@ -376,6 +376,9 @@ export default definePlugin({
if (!messageLinkRegex.test(props.message.content)) if (!messageLinkRegex.test(props.message.content))
return null; return null;
// need to reset the regex because it's global
messageLinkRegex.lastIndex = 0;
return ( return (
<ErrorBoundary> <ErrorBoundary>
<MessageEmbedAccessory <MessageEmbedAccessory