clean up copy constructor

This commit is contained in:
Hazel K 2024-09-29 22:50:39 -04:00
parent d1b5b54bad
commit 0a09e6d86a
1 changed files with 1 additions and 3 deletions

View File

@ -36,10 +36,8 @@ export class LatestNote {
public note: MiNote | null; public note: MiNote | null;
constructor(data: Partial<LatestNote>) { constructor(data: Partial<LatestNote>) {
if (data == null) return;
for (const [k, v] of Object.entries(data)) { for (const [k, v] of Object.entries(data)) {
(this as any)[k] = v; (this as Record<string, unknown>)[k] = v;
} }
} }
} }