Browse Source

:bug: open new window

Vanessa 2 năm trước cách đây
mục cha
commit
0b001595
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      app/src/window/openNewWindow.ts

+ 3 - 1
app/src/window/openNewWindow.ts

@@ -43,7 +43,9 @@ export const openNewWindowById = (id: string) => {
         };
         if (response.data.rootID === id) {
             fetchPost("/api/attr/getBlockAttrs", {id}, (attrResponse) => {
-                json.children.scrollAttr = JSON.parse(attrResponse.data.scroll || "{}");
+                if (attrResponse.data.scroll) {
+                    json.children.scrollAttr = JSON.parse(attrResponse.data.scroll);
+                }
                 /// #if !BROWSER
                 ipcRenderer.send(Constants.SIYUAN_OPENWINDOW, {
                     id: getCurrentWindow().id,