This commit is contained in:
Vanessa 2023-05-14 09:29:18 +08:00
parent 0daed2d12a
commit 2ae4192392
2 changed files with 14 additions and 14 deletions

View file

@ -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 {