From 0a09e6d86a2feb03f59e00210fe36b509333f1d7 Mon Sep 17 00:00:00 2001 From: Hazel K Date: Sun, 29 Sep 2024 22:50:39 -0400 Subject: [PATCH] clean up copy constructor --- packages/backend/src/models/LatestNote.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/backend/src/models/LatestNote.ts b/packages/backend/src/models/LatestNote.ts index 5cce09e556..24cb9607b0 100644 --- a/packages/backend/src/models/LatestNote.ts +++ b/packages/backend/src/models/LatestNote.ts @@ -36,10 +36,8 @@ export class LatestNote { public note: MiNote | null; constructor(data: Partial) { - if (data == null) return; - for (const [k, v] of Object.entries(data)) { - (this as any)[k] = v; + (this as Record)[k] = v; } } }