mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-06 16:53:42 +08:00
fix: do not reuse state variable directly
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user