aboutsummaryrefslogtreecommitdiff
path: root/webAO/viewport/utils
diff options
context:
space:
mode:
Diffstat (limited to 'webAO/viewport/utils')
-rw-r--r--webAO/viewport/utils/handleICSpeaking.ts17
1 files changed, 11 insertions, 6 deletions
diff --git a/webAO/viewport/utils/handleICSpeaking.ts b/webAO/viewport/utils/handleICSpeaking.ts
index b1aa02d..e8fd251 100644
--- a/webAO/viewport/utils/handleICSpeaking.ts
+++ b/webAO/viewport/utils/handleICSpeaking.ts
@@ -301,11 +301,16 @@ export const handle_ic_speaking = async (playerChatMsg: ChatMsg) => {
client.viewport.getChatmsg().sound = client.viewport.getChatmsg().effects[2];
}
- client.viewport.getChatmsg().parsed = await attorneyMarkdown.applyMarkdown(
- client.viewport.getChatmsg().content,
-
- COLORS[client.viewport.getChatmsg().color]
-
- );
+ try {
+ client.viewport.getChatmsg().parsed = await attorneyMarkdown.applyMarkdown(
+ client.viewport.getChatmsg().content,
+
+ COLORS[client.viewport.getChatmsg().color]
+
+ );
+ } catch (error) {
+ console.warn("markdown failed");
+ }
+
client.viewport.chat_tick();
}; \ No newline at end of file