mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-22 22:30:52 +01:00
Fix the if statement
This commit is contained in:
parent
33fb28ad5a
commit
5c2c009292
@ -89,17 +89,15 @@ export const ChatInputView: FC<{}> = props =>
|
|||||||
|
|
||||||
if(text.length <= maxChatLength)
|
if(text.length <= maxChatLength)
|
||||||
{
|
{
|
||||||
const re = /%CC%/g
|
if(/%CC%/g.test(encodeURIComponent(text)))
|
||||||
const hasZalgo = txt => re.test(encodeURIComponent(txt));
|
|
||||||
|
|
||||||
if (hasZalgo(text))
|
|
||||||
{
|
{
|
||||||
setChatValue('');
|
setChatValue('');
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
setChatValue('');
|
{
|
||||||
sendChat(text, chatType, recipientName, chatStyleId);
|
setChatValue('');
|
||||||
|
sendChat(text, chatType, recipientName, chatStyleId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setChatValue(append);
|
setChatValue(append);
|
||||||
|
Loading…
Reference in New Issue
Block a user