From c37a51c6d0db8373965a9ecce3aba2f3bccc6046 Mon Sep 17 00:00:00 2001 From: perf3ct Date: Thu, 3 Oct 2024 22:48:47 -0700 Subject: [PATCH] use type assertions to make TS happy? --- src/services/import/zip.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/import/zip.ts b/src/services/import/zip.ts index 22d32eedf..c2c06b1be 100644 --- a/src/services/import/zip.ts +++ b/src/services/import/zip.ts @@ -478,7 +478,7 @@ async function importZip(taskContext: TaskContext, fileBuffer: Buffer, importRoo // only skeleton was created because of altered order of cloned notes in ZIP, we need to update // https://github.com/zadam/trilium/issues/2440 if (note.type === undefined) { - note.type = type; + note.type = type as NoteType; note.mime = mime; note.title = noteTitle || ""; note.isProtected = isProtected; @@ -503,7 +503,7 @@ async function importZip(taskContext: TaskContext, fileBuffer: Buffer, importRoo title: noteTitle || "", content: content, noteId, - type, + type: type as NoteType, mime, prefix: noteMeta?.prefix || '', isExpanded: !!noteMeta?.isExpanded,