This commit is contained in:
Vanessa 2026-01-10 10:11:36 +08:00
parent 58afc27c39
commit b7ee623b1d
2 changed files with 3 additions and 3 deletions

View file

@ -235,7 +235,7 @@ export class Protyle {
setEmpty(app);
/// #else
if (this.protyle.model) {
this.protyle.model.parent.parent.removeTab(this.protyle.model.parent.id, false);
this.protyle.model.parent.parent.removeTab(this.protyle.model.parent.id);
}
/// #endif
}
@ -246,7 +246,7 @@ export class Protyle {
setEmpty(app);
/// #else
if (this.protyle.model) {
this.protyle.model.parent.parent.removeTab(this.protyle.model.parent.id, false);
this.protyle.model.parent.parent.removeTab(this.protyle.model.parent.id);
}
/// #endif
delete window.siyuan.storage[Constants.LOCAL_FILEPOSITION][this.protyle.block.rootID];

View file

@ -38,7 +38,7 @@ export const onGet = (options: {
// 其他报错
if (!options.action.includes(Constants.CB_GET_APPEND)) { // 向下加载时块可能还没有创建 https://github.com/siyuan-note/siyuan/issues/10851
if (options.protyle.model) {
options.protyle.model.parent.parent.removeTab(options.protyle.model.parent.id, false);
options.protyle.model.parent.parent.removeTab(options.protyle.model.parent.id);
} else {
options.protyle.element.innerHTML = `<div class="ft__smaller ft__secondary b3-form__space--small" contenteditable="false">${window.siyuan.languages.refExpired}</div>`;
}