fix: do not reuse state variable directly

This commit is contained in:
JustSong
2023-06-24 19:45:18 +08:00
parent 536cbe4c8b
commit 8b8645af45
+1 -1
View File
@@ -107,7 +107,7 @@ const LogsTable = () => {
if (startIdx === 0) { if (startIdx === 0) {
setLogs(data); setLogs(data);
} else { } else {
let newLogs = logs; let newLogs = [...logs];
newLogs.push(...data); newLogs.push(...data);
setLogs(newLogs); setLogs(newLogs);
} }