mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 06:16:59 +08:00
fix(core): fix meta.xxx is undefined (#6321)
This commit is contained in:
@@ -14,7 +14,7 @@ export class PageRecord {
|
||||
private readonly localState: WorkspaceLocalState
|
||||
) {}
|
||||
|
||||
meta$ = LiveData.from<DocMeta>(
|
||||
meta$ = LiveData.from<Partial<DocMeta>>(
|
||||
new Observable<DocMeta>(subscriber => {
|
||||
const emit = () => {
|
||||
const meta = this.workspace.docCollection.meta.docMetas.find(
|
||||
@@ -60,5 +60,5 @@ export class PageRecord {
|
||||
return this.mode$.value;
|
||||
}
|
||||
|
||||
title$ = this.meta$.map(meta => meta.title);
|
||||
title$ = this.meta$.map(meta => meta.title ?? '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user