Explorar o código

:art: https://github.com/siyuan-note/siyuan/issues/13131

Vanessa hai 8 meses
pai
achega
eb28a44022
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      app/src/dialog/processSystem.ts

+ 3 - 0
app/src/dialog/processSystem.ts

@@ -173,6 +173,9 @@ export const setDefRefCount = (data: {
 }) => {
 }) => {
     getAllEditor().forEach(editor => {
     getAllEditor().forEach(editor => {
         if (data.rootID === data.blockID && editor.protyle.block.rootID === data.rootID) {
         if (data.rootID === data.blockID && editor.protyle.block.rootID === data.rootID) {
+            if (!editor.protyle.title) {
+                return;
+            }
             const attrElement = editor.protyle.title.element.querySelector(".protyle-attr");
             const attrElement = editor.protyle.title.element.querySelector(".protyle-attr");
             const countElement = attrElement.querySelector(".protyle-attr--refcount");
             const countElement = attrElement.querySelector(".protyle-attr--refcount");
             if (countElement) {
             if (countElement) {