From 2f7d818c548355ca3fea3bedc128fe55a76dec97 Mon Sep 17 00:00:00 2001 From: Nya Candy Date: Mon, 1 Apr 2024 21:47:02 +0800 Subject: [PATCH] fix: null history --- packages/frontend/src/scripts/use-note-capture.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/scripts/use-note-capture.ts b/packages/frontend/src/scripts/use-note-capture.ts index 50fbffb35..2e402a188 100644 --- a/packages/frontend/src/scripts/use-note-capture.ts +++ b/packages/frontend/src/scripts/use-note-capture.ts @@ -77,7 +77,7 @@ export function useNoteCapture(props: { case 'updated': { note.value.history = [ - ...note.value.history, + ...(note.value.history || []), { createdAt: note.value.updatedAt, cw: note.value.cw,