From d0a22bc517c7cbfc2385ef67f7cb08d8a914ec69 Mon Sep 17 00:00:00 2001 From: SiriusXT <1160925501@qq.com> Date: Mon, 29 Dec 2025 15:27:11 +0800 Subject: [PATCH] fix(window): Fix empty array issue during openNoteContents data migration --- .../0234__migrate_open_note_contexts_format.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/server/src/migrations/0234__migrate_open_note_contexts_format.ts b/apps/server/src/migrations/0234__migrate_open_note_contexts_format.ts index 72b09ed2a..c04bcc073 100644 --- a/apps/server/src/migrations/0234__migrate_open_note_contexts_format.ts +++ b/apps/server/src/migrations/0234__migrate_open_note_contexts_format.ts @@ -18,8 +18,13 @@ export default () => { return; } - // Already in new format, skip - if (parsed[0].windowId) { + // Already in new format (array + windowId), skip + if ( + Array.isArray(parsed) && + parsed.length > 0 && + typeof parsed[0] === "object" && + parsed[0].windowId + ) { return; }