diff --git a/app/src/history/diff.ts b/app/src/history/diff.ts index 631e4c258..797b3498a 100644 --- a/app/src/history/diff.ts +++ b/app/src/history/diff.ts @@ -90,7 +90,7 @@ const renderCompare = (app: App, element: HTMLElement) => { action: [Constants.CB_GET_HISTORY, Constants.CB_GET_HTML], }); } - textElement.previousElementSibling.textContent = dayjs(response.data.updated).format("YYYY-MM-DD HH:mm"); + leftElement.querySelector(".history__date").textContent = dayjs(response.data.updated).format("YYYY-MM-DD HH:mm"); }); const id2 = element.getAttribute("data-id2"); if (id2) { @@ -118,7 +118,7 @@ const renderCompare = (app: App, element: HTMLElement) => { action: [Constants.CB_GET_HISTORY, Constants.CB_GET_HTML], }); } - textElement.previousElementSibling.textContent = dayjs(response.data.updated).format("YYYY-MM-DD HH:mm"); + rightElement.querySelector(".history__date").textContent = dayjs(response.data.updated).format("YYYY-MM-DD HH:mm"); }); } else { rightElement.classList.add("fn__none"); @@ -241,13 +241,13 @@ const genHTML = (left: string, right: string, dialog: Dialog, direct: string) =>
${dayjs(response.data.left.created).format("YYYY-MM-DD HH:mm")}
-
+
${dayjs(response.data.right.created).format("YYYY-MM-DD HH:mm")}
-
+