From 0577c4084401566e47fd9f8569101b9eac071b78 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 9 Sep 2022 10:34:11 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/5845 --- app/src/util/history.ts | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/app/src/util/history.ts b/app/src/util/history.ts index 111f1e468..ca460ee84 100644 --- a/app/src/util/history.ts +++ b/app/src/util/history.ts @@ -64,8 +64,8 @@ const renderDoc = (element: HTMLElement, currentPage: number) => { `; if (item.items.length > 0) { logsHTML += `"; - if (index === 0) { - if (typeElement.value === "1") { - assetElement.innerHTML = renderAssetsPreview(item.items[0].path); - } else { - fetchPost("/api/history/getDocHistoryContent", { - historyPath: item.items[0].path, - k: inputElement.value - }, (contentResponse) => { - if (contentResponse.data.isLargeDoc) { - mdElement.value = contentResponse.data.content; - mdElement.classList.remove("fn__none"); - docElement.classList.add("fn__none"); - } else { - mdElement.classList.add("fn__none"); - docElement.classList.remove("fn__none"); - onGet(contentResponse, historyEditor.protyle, [Constants.CB_GET_HISTORY, Constants.CB_GET_HTML]); - } - }); - } - } } }); element.lastElementChild.firstElementChild.innerHTML = logsHTML;