Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/10129

Vanessa79d88a052655
diff --git a/app/src/protyle/scroll/saveScroll.ts b/app/src/protyle/scroll/saveScroll.ts
index 8aa5a87381..20b7017340 100644
--- a/app/src/protyle/scroll/saveScroll.ts
+++ b/app/src/protyle/scroll/saveScroll.ts
@@ -65,14 +65,28 @@ export const getDocByScroll = (options: {
id: options.scrollAttr.zoomInId,
size: Constants.SIZE_GET_MAX,
}, response => {
- actions.push(Constants.CB_GET_ALL);
- onGet({
- data: response,
- protyle: options.protyle,
- action: actions,
- scrollAttr: options.scrollAttr,
- afterCB: options.cb
- });
+ if (response.code === 1) {
+ fetchPost("/api/filetree/getDoc", {
+ id: options.scrollAttr.rootId || options.mergedOptions?.blockId || options.protyle.block?.rootID || options.scrollAttr.startId,
+ }, response => {
+ onGet({
+ data: response,
+ protyle: options.protyle,
+ action: actions,
+ scrollAttr: options.scrollAttr,
+ afterCB: options.cb
+ });
+ });
+ } else {
+ actions.push(Constants.CB_GET_ALL);
+ onGet({
+ data: response,
+ protyle: options.protyle,
+ action: actions,
+ scrollAttr: options.scrollAttr,
+ afterCB: options.cb
+ });
+ }
});
return;
}