From efa4192278d6987c33fd647c447485afca38598b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 16 Nov 2024 10:04:13 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/12989 --- app/src/card/openCard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.ts index 065e4d645..57b6f6c5d 100644 --- a/app/src/card/openCard.ts +++ b/app/src/card/openCard.ts @@ -203,7 +203,7 @@ export const bindCardEvent = async (options: { } options.element.setAttribute("data-key", Constants.DIALOG_OPENCARD); const actionElements = options.element.querySelectorAll(".card__action"); - if (options.index === 0) { + if (options.index === 0 || typeof options.index === "undefined") { actionElements[0].firstElementChild.setAttribute("disabled", "disabled"); } else { actionElements[0].firstElementChild.removeAttribute("disabled");