fix(js): tolerate missing File constructor

Guard URL-encoded form serialization so constrained browser contexts without File still submit generated hemx forms instead of throwing before fetch.

req: runtime/002
This commit is contained in:
slhx agent
2026-06-05 17:33:09 +02:00
parent 90dd689ba0
commit c56ec39813
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -153,7 +153,7 @@
function urlEncoded(data) {
const encoded = new URLSearchParams();
for (const [name, value] of data.entries()) {
if (value instanceof File) continue;
if (typeof File !== "undefined" && value instanceof File) continue;
encoded.append(name, value);
}
return encoded;