Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: fix https://github.com/siyuan-note/siyuan/issues/7173

Vanessab4c73e7ca157
diff --git a/app/src/card/makeCard.ts b/app/src/card/makeCard.ts
index 805e547cb5..d652732d33 100644
--- a/app/src/card/makeCard.ts
+++ b/app/src/card/makeCard.ts
@@ -234,6 +234,9 @@ const viewCards = (deckID: string, title: string, sourceElement: HTMLElement) =>
while (target && !dialog.element.isSameNode(target)) {
const type = target.getAttribute("data-type");
if (type === "previous") {
+ if (pageIndex <= 1) {
+ return;
+ }
pageIndex--;
if (pageIndex <= 1) {
previousElement.setAttribute("disabled", "disabled");
@@ -252,6 +255,9 @@ const viewCards = (deckID: string, title: string, sourceElement: HTMLElement) =>
event.preventDefault();
break;
} else if (type === "next") {
+ if (pageIndex >= response.data.pageCount) {
+ return;
+ }
pageIndex++;
previousElement.removeAttribute("disabled");
fetchPost("/api/riff/getRiffCards", {deckID, page: pageIndex}, (cardsResponse) => {