Skip to content

Commit 372c1ae

Browse files
committed
required formdata cast is not a ts bug
microsoft/TypeScript-DOM-lib-generator#880 (comment)
1 parent ee9ec44 commit 372c1ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/site/src/gameSearch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ window.lichess.load.then(() => {
5454

5555
function serialize() {
5656
const params = new URLSearchParams();
57-
for (let [k, v] of new FormData(form).entries()) {
58-
if (v != '') params.set(k, v as any); // typescript wants v to be a File
57+
for (const [k, v] of new FormData(form).entries()) {
58+
if (v != '') params.set(k, v as string);
5959
}
6060
return params.toString();
6161
}

0 commit comments

Comments
 (0)