From 5b413d6fb4f64c5910fe3fff2073c85d872a5b14 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 9 Dec 2024 23:17:13 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/dialog/processSystem.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts index 72f025c16..b34182253 100644 --- a/app/src/dialog/processSystem.ts +++ b/app/src/dialog/processSystem.ts @@ -179,14 +179,14 @@ export const setDefRefCount = (data: { const attrElement = editor.protyle.title.element.querySelector(".protyle-attr"); const countElement = attrElement.querySelector(".protyle-attr--refcount"); if (countElement) { - if (data.refCount === 0) { + if (data.rootRefCount === 0) { countElement.remove(); } else { - countElement.textContent = data.refCount.toString(); + countElement.textContent = data.rootRefCount.toString(); countElement.setAttribute("data-id", JSON.stringify(data.refIDs)); } - } else if (data.refCount > 0) { - attrElement.insertAdjacentHTML("beforeend", `
${data.refCount}
`); + } else if (data.rootRefCount > 0) { + attrElement.insertAdjacentHTML("beforeend", `
${data.rootRefCount}
`); } return; }