From 0fa9726bb84d0d1246349f3f216d1067514ef6ca Mon Sep 17 00:00:00 2001 From: Jeffrey Chen <78434827+TCOTC@users.noreply.github.com> Date: Sat, 28 Sep 2024 11:38:33 +0800 Subject: [PATCH] historyElement (#12624) --- app/src/history/history.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/history/history.ts b/app/src/history/history.ts index 11b362fd0e0..3e40e1535c1 100644 --- a/app/src/history/history.ts +++ b/app/src/history/history.ts @@ -495,6 +495,7 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => { }); disabledProtyle(historyEditor.protyle); const repoElement = element.querySelector('#historyContainer [data-type="repo"]'); + const historyElement = element.querySelector('#historyContainer [data-type="doc"]'); const repoSelectElement = repoElement.querySelector(".b3-select") as HTMLSelectElement; repoSelectElement.addEventListener("change", () => { renderRepo(repoElement, 1); @@ -833,7 +834,7 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => { ); } } else if (type === "jumpHistoryPage") { - const currentPage = parseInt(repoElement.getAttribute("data-page")); + const currentPage = parseInt(historyElement.getAttribute("data-page")); const totalPage = parseInt(target.getAttribute("data-totalpage") || "1"); if (totalPage > 1) {