mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-26 17:04:07 +01:00
🐛 删除已打开页签报错
This commit is contained in:
parent
c358f8f8ee
commit
5acdc1f3c7
4 changed files with 9 additions and 9 deletions
|
|
@ -140,13 +140,13 @@ class Protyle {
|
|||
break;
|
||||
case "unmount":
|
||||
if (this.protyle.model && this.protyle.notebookId === data.data.box) {
|
||||
this.protyle.model.parent.parent.removeTab(this.protyle.model.parent.id);
|
||||
this.protyle.model.parent.parent.removeTab(this.protyle.model.parent.id, false, false);
|
||||
}
|
||||
break;
|
||||
case "remove":
|
||||
if (this.protyle.model && (this.protyle.notebookId === data.data.box &&
|
||||
(!data.data.path || this.protyle.path.indexOf(getDisplayName(data.data.path, false, true)) === 0))) {
|
||||
this.protyle.model.parent.parent.removeTab(this.protyle.model.parent.id);
|
||||
this.protyle.model.parent.parent.removeTab(this.protyle.model.parent.id, false, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export const onGet = (data: IWebSocketData, protyle: IProtyle, action: string[]
|
|||
if (data.code === 1) {
|
||||
// 其他报错
|
||||
if (protyle.model) {
|
||||
protyle.model.parent.parent.removeTab(protyle.model.parent.id);
|
||||
protyle.model.parent.parent.removeTab(protyle.model.parent.id, false, false);
|
||||
} else {
|
||||
protyle.element.innerHTML = `<div class="ft__smaller ft__secondary b3-form__space--small" contenteditable="false">${window.siyuan.languages.refExpired}</div>`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue