mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 10:35:12 +00:00
fix crash during startup
This commit is contained in:
parent
01ec9635c1
commit
7b104ffe94
1 changed files with 3 additions and 1 deletions
|
@ -39,7 +39,9 @@ export class LatestNote {
|
||||||
})
|
})
|
||||||
public note: MiNote | null;
|
public note: MiNote | null;
|
||||||
|
|
||||||
constructor(data: Partial<LatestNote>) {
|
constructor(data?: Partial<LatestNote>) {
|
||||||
|
if (!data) return;
|
||||||
|
|
||||||
for (const [k, v] of Object.entries(data)) {
|
for (const [k, v] of Object.entries(data)) {
|
||||||
(this as Record<string, unknown>)[k] = v;
|
(this as Record<string, unknown>)[k] = v;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue