Skip to content

Commit 5ed3b21

Browse files
authored
Fix keep forever selection box (#861)
fixes: #857 Signed-off-by: Lan Xia <[email protected]>
1 parent a8cd962 commit 5ed3b21

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test-result-summary-client/src/Build/TopLevelBuildTable.jsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ function TopLevelBuildTable(props) {
7979

8080
// Declare a function that handles the Keep Forever checkbox.
8181
async function handleKeepForverClick(record) {
82-
// Destructure the 'buildInfo' object from an object with an undefined property named 'buildInfo'.
83-
const { buildInfo } = { buildInfo };
8482
// If the 'record' object has a 'key' property:
8583
if (record.key) {
8684
// Loop through each 'build' object in the 'buildInfo' array:
@@ -100,9 +98,7 @@ function TopLevelBuildTable(props) {
10098
break;
10199
}
102100
}
103-
// Wait for 100ms before setting the 'buildInfo' state variable.
104-
await new Promise((r) => setTimeout(r, 100));
105-
setBuildInfo(buildInfo);
101+
setBuildInfo(structuredClone(buildInfo));
106102
}
107103
}
108104

0 commit comments

Comments
 (0)