From 3398c6170069a301783e7e13e6ed47b757c490bf Mon Sep 17 00:00:00 2001 From: smolgrrr Date: Tue, 28 Nov 2023 14:06:52 +1100 Subject: [PATCH] fix metadata bug --- client/src/utils/otherUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/utils/otherUtils.ts b/client/src/utils/otherUtils.ts index f85f308..e0a2306 100644 --- a/client/src/utils/otherUtils.ts +++ b/client/src/utils/otherUtils.ts @@ -36,6 +36,7 @@ export interface Metadata { } export const getMetadata = (event: Event) => { - const metadata: Metadata = JSON.parse(event.content) + const content = event.content.replace(/[\n\r\t]/g, '') + const metadata: Metadata = JSON.parse(content) return metadata } \ No newline at end of file