mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 03:10:16 +01:00
🐛
This commit is contained in:
parent
acd9f76e87
commit
1b02bf91d5
1 changed files with 2 additions and 2 deletions
|
|
@ -138,7 +138,7 @@ export const initBlockPopover = () => {
|
|||
ids = [dataId];
|
||||
}
|
||||
defIds = JSON.parse(popoverTargetElement.getAttribute("data-defids") || "[]");
|
||||
} else if (popoverTargetElement.getAttribute("data-type").indexOf("virtual-block-ref") > -1) {
|
||||
} else if (popoverTargetElement.getAttribute("data-type")?.indexOf("virtual-block-ref") > -1) {
|
||||
const nodeElement = hasClosestBlock(popoverTargetElement);
|
||||
if (nodeElement) {
|
||||
const postResponse = await fetchSyncPost("/api/block/getBlockDefIDsByRefText", {
|
||||
|
|
@ -147,7 +147,7 @@ export const initBlockPopover = () => {
|
|||
});
|
||||
ids = postResponse.data;
|
||||
}
|
||||
} else if (popoverTargetElement.getAttribute("data-type").split(" ").includes("a")) {
|
||||
} else if (popoverTargetElement.getAttribute("data-type")?.split(" ").includes("a")) {
|
||||
// 以思源协议开头的链接
|
||||
ids = [popoverTargetElement.getAttribute("data-href").substr(16, 22)];
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue