fix: sometimes kick messages where not formatted
This commit is contained in:
parent
8f91d282d2
commit
ce8e414528
1 changed files with 5 additions and 0 deletions
|
|
@ -21,6 +21,11 @@ export const displayClientChat = (text: string) => {
|
|||
}
|
||||
|
||||
export const parseFormattedMessagePacket = (arg) => {
|
||||
if (typeof arg === 'string') {
|
||||
try {
|
||||
arg = JSON.parse(arg)
|
||||
} catch {}
|
||||
}
|
||||
if (typeof arg === 'object') {
|
||||
try {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue