From 1579ef1e99f892b6c6a392ab221649abde68567f Mon Sep 17 00:00:00 2001 From: djohnson Date: Mon, 25 Nov 2024 11:32:53 +0900 Subject: [PATCH] fix: extra details should be assigned correctly --- src/core/message/MessageViewModel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/message/MessageViewModel.ts b/src/core/message/MessageViewModel.ts index 7ff4a03..a1d5dc7 100644 --- a/src/core/message/MessageViewModel.ts +++ b/src/core/message/MessageViewModel.ts @@ -79,7 +79,7 @@ export class MessageViewModel { update = (data: Partial) => { this.slowUpdate.cancel?.() - + return messageTable.put({ ...this.source, ...data }) } @@ -102,7 +102,7 @@ export class MessageViewModel { async setExtraDetails(detailObject?: Record) { 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 }) }