Skip to content

Commit

Permalink
fix: should show title alias first (#9005)
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Dec 18, 2024
1 parent 7075d9e commit bf0a93f
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ export class DocDisplayMetaService
});
}

title(pageId: string): Signal<string> {
title(pageId: string, { title }: DocDisplayMetaParams = {}): Signal<string> {
const doc = this.std.collection.getDoc(pageId);

if (!doc) {
return signal('Deleted doc');
return signal(title || 'Deleted doc');
}

let title$ = this.titleMap.get(doc);
Expand All @@ -183,7 +183,9 @@ export class DocDisplayMetaService
this.titleMap.set(doc, title$);
}

return title$;
return computed(() => {
return title || title$.value;
});
}

override unmounted() {
Expand Down

0 comments on commit bf0a93f

Please sign in to comment.