diff --git a/packages/backend/src/models/LatestNote.ts b/packages/backend/src/models/LatestNote.ts index 4b81c46d43..4a712c8e20 100644 --- a/packages/backend/src/models/LatestNote.ts +++ b/packages/backend/src/models/LatestNote.ts @@ -39,7 +39,9 @@ export class LatestNote { }) public note: MiNote | null; - constructor(data: Partial) { + constructor(data?: Partial) { + if (!data) return; + for (const [k, v] of Object.entries(data)) { (this as Record)[k] = v; }