Browse Source

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

Vanessa 8 months ago
parent
commit
efa4192278
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/src/card/openCard.ts

+ 1 - 1
app/src/card/openCard.ts

@@ -203,7 +203,7 @@ export const bindCardEvent = async (options: {
     }
     }
     options.element.setAttribute("data-key", Constants.DIALOG_OPENCARD);
     options.element.setAttribute("data-key", Constants.DIALOG_OPENCARD);
     const actionElements = options.element.querySelectorAll(".card__action");
     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");
         actionElements[0].firstElementChild.setAttribute("disabled", "disabled");
     } else {
     } else {
         actionElements[0].firstElementChild.removeAttribute("disabled");
         actionElements[0].firstElementChild.removeAttribute("disabled");