mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 10:30:13 +01:00
This commit is contained in:
parent
22fdaa71ef
commit
d47a8ffe02
1 changed files with 4 additions and 1 deletions
|
|
@ -267,9 +267,12 @@ export const expandDocTree = async (options: {
|
|||
options.isSetCurrent = true;
|
||||
}
|
||||
if (isNotebook) {
|
||||
liElement = file.element.querySelector(`.b3-list[data-url="${options.id}"]`).firstElementChild as HTMLElement;
|
||||
liElement = file.element.querySelector(`.b3-list[data-url="${options.id}"]`)?.firstElementChild as HTMLElement;
|
||||
} else {
|
||||
const response = await fetchSyncPost("api/block/getBlockInfo", {id: options.id});
|
||||
if (response.code === -1) {
|
||||
return;
|
||||
}
|
||||
notebookId = response.data.box;
|
||||
liElement = await file.selectItem(response.data.box, response.data.path, undefined, undefined, options.isSetCurrent);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue