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 += `
`;
- item.items.forEach((docItem, docIndex) => {
- logsHTML += `-
+ item.items.forEach((docItem) => {
+ logsHTML += `
-
${escapeHtml(docItem.title)}
@@ -74,26 +74,6 @@ const renderDoc = (element: HTMLElement, currentPage: number) => {
`;
});
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;