mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-08 09:48:50 +01:00
This commit is contained in:
parent
d1422ea0df
commit
ff5cf4c685
1 changed files with 7 additions and 0 deletions
|
|
@ -213,6 +213,9 @@ ${padHTML}
|
|||
if (!blockElement) {
|
||||
blockElement = getNoContainerElement(protyle.wysiwyg.element.firstElementChild) || protyle.wysiwyg.element.firstElementChild;
|
||||
}
|
||||
if (!blockElement) {
|
||||
return;
|
||||
}
|
||||
const id = blockElement.getAttribute("data-node-id");
|
||||
fetchPost("/api/block/getBlockBreadcrumb", {id, excludeTypes: []}, (response) => {
|
||||
response.data.forEach((item: IBreadcrumb) => {
|
||||
|
|
@ -603,6 +606,10 @@ ${padHTML}
|
|||
if (!blockElement) {
|
||||
blockElement = getNoContainerElement(protyle.wysiwyg.element.firstElementChild) || protyle.wysiwyg.element.firstElementChild;
|
||||
}
|
||||
if (!blockElement) {
|
||||
// 浮窗删除单个块后,面包屑无法获取到 blockElement,直接返回即可
|
||||
return;
|
||||
}
|
||||
const id = blockElement.getAttribute("data-node-id");
|
||||
if (id === this.id && !update) {
|
||||
protyle.breadcrumb.element.querySelectorAll(".protyle-breadcrumb__item--active").forEach(item => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue