Skip to content

Commit

Permalink
fix: extra details should be assigned correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdjohnson committed Nov 25, 2024
1 parent 69605dc commit 1579ef1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/message/MessageViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class MessageViewModel {

update = (data: Partial<MessageModel>) => {
this.slowUpdate.cancel?.()

return messageTable.put({ ...this.source, ...data })
}

Expand All @@ -102,7 +102,7 @@ export class MessageViewModel {

async setExtraDetails(detailObject?: Record<string, unknown>) {
const details = formatMessageDetails(detailObject)
const extras = MessageExtrasModel.safeParse({ ...this.source.extras, details })
const extras = MessageExtrasModel.safeParse({ ...this.source.extras, details }).data

await this.update({ extras })
}
Expand Down

0 comments on commit 1579ef1

Please sign in to comment.