Vanessa 2025-12-09 11:37:43 +08:00
parent d24874154d
commit 258e562726
2 changed files with 6 additions and 1 deletions

View file

@ -332,7 +332,9 @@ export class Outline extends Model {
preview: this.isPreview
}, response => {
this.update(response);
this.updateDocTitle((options.tab.model as Editor)?.editor?.protyle?.background?.ial, response.data?.length || 0);
if (this.blockId) {
this.updateDocTitle((options.tab.model as Editor)?.editor?.protyle?.background?.ial, response.data?.length || 0);
}
});
}

View file

@ -613,6 +613,9 @@ export class Dock {
blockId: editor?.protyle?.block?.rootID,
isPreview: editor?.protyle?.preview ? !editor.protyle.preview.element.classList.contains("fn__none") : false
});
if (editor?.protyle?.block?.rootID) {
outline.updateDocTitle(editor?.protyle?.background?.ial);
}
tab.addModel(outline);
}
});