Skip to content

Commit

Permalink
historyElement (#12624)
Browse files Browse the repository at this point in the history
  • Loading branch information
TCOTC authored Sep 28, 2024
1 parent 214b566 commit 0fa9726
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/history/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0fa9726

Please sign in to comment.