mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-21 22:44:06 +01:00
🎨
This commit is contained in:
parent
0daed2d12a
commit
2ae4192392
2 changed files with 14 additions and 14 deletions
|
|
@ -199,25 +199,25 @@ export class Protyle {
|
|||
fetchPost("/api/block/getDocInfo", {
|
||||
id: options.blockId
|
||||
}, (response) => {
|
||||
let scrollObj;
|
||||
if (response.data.ial.scroll) {
|
||||
let scrollObj;
|
||||
try {
|
||||
scrollObj = JSON.parse(response.data.ial.scroll.replace(/"/g, '"'));
|
||||
} catch (e) {
|
||||
scrollObj = undefined;
|
||||
}
|
||||
if (scrollObj) {
|
||||
getDocByScroll({
|
||||
protyle: this.protyle,
|
||||
scrollAttr: scrollObj,
|
||||
mergedOptions,
|
||||
cb: () => {
|
||||
this.afterOnGet(mergedOptions);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.getDoc(mergedOptions);
|
||||
}
|
||||
}
|
||||
if (scrollObj) {
|
||||
getDocByScroll({
|
||||
protyle: this.protyle,
|
||||
scrollAttr: scrollObj,
|
||||
mergedOptions,
|
||||
cb: () => {
|
||||
this.afterOnGet(mergedOptions);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.getDoc(mergedOptions);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue