This commit is contained in:
Untone 2024-02-17 17:31:08 +03:00
parent 002ffe64fc
commit e32e3d31ea
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ export const FullArticle = (props: Props) => {
const media = createMemo<MediaItem[]>(() => {
try {
return JSON.parse(props.article?.media || "[]")
return JSON.parse(props.article?.media || '[]')
} catch {
return []
}

View File

@ -50,7 +50,7 @@ export const ConnectProvider = (props: { children: JSX.Element }) => {
Authorization: token,
},
onmessage(event) {
const m: SSEMessage = JSON.parse(event.data || "{}")
const m: SSEMessage = JSON.parse(event.data || '{}')
console.log('[context.connect] Received message:', m)
// Iterate over all registered handlers and call them