From 922f9ee82036557cedea76dfb5bd4baa71285e83 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 3 Jun 2023 15:59:24 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/8438 --- app/src/history/diff.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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")}
-
+