fix issue of accessing undefined tab.headElement (#8363)

This commit is contained in:
Yingyi / 颖逸
2023-05-26 22:03:24 +08:00
committed by GitHub
parent b7c8290230
commit fc15f39ece

View File

@@ -24,7 +24,7 @@ export class Custom extends Model {
}) {
super({app: options.app, id: options.tab.id});
if (window.siyuan.config.fileTree.openFilesUseCurrentTab) {
options.tab.headElement.classList.add("item--unupdate");
options.tab.headElement?.classList.add("item--unupdate");
}
this.element = options.tab.panelElement;