Browse Source

修复历史数据刷新问题

skyfffire 2 months ago
parent
commit
5382ebc0ed
1 changed files with 4 additions and 5 deletions
  1. 4 5
      monitor.html

+ 4 - 5
monitor.html

@@ -142,12 +142,11 @@
 
             function renderHistoryDataTable(data) {
                 const tableContainer = document.getElementById('history-table');
-                
-                if (historyDataTable && !document.body.contains(historyDataTable.table)) {
-                    historyDataTable = null;
-                }
+    
+                // 更简单的检测逻辑 - 销毁旧表格
                 if (historyDataTable) {
-                    historyDataTable.destroy(); 
+                    historyDataTable.destroy();
+                    historyDataTable = null;
                 }
 
                 if (!data || data.length === 0) {