소스 검색

fix: do not reuse state variable directly

JustSong 2 년 전
부모
커밋
f5c1fcd3c3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      web/src/components/LogsTable.js

+ 1 - 1
web/src/components/LogsTable.js

@@ -107,7 +107,7 @@ const LogsTable = () => {
       if (startIdx === 0) {
         setLogs(data);
       } else {
-        let newLogs = logs;
+        let newLogs = [...logs];
         newLogs.push(...data);
         setLogs(newLogs);
       }