Commit 747a8ee
fetch-transport: don't pass an undefined filename to FormData.append
Fixes the Node 22 CI failure (present on main since the Phase 2 merge --
the Node 22 leg has been red, masked locally by developing on Node 24).
FormData coerces an explicitly-passed undefined filename argument to the
string 'undefined' on Node 18-22, clobbering a File attachment's own
name; Node 24+ treats a trailing undefined as absent. Omit the argument
entirely when no name override exists, which is what the adjacent
comment always claimed the code did.
Verified: transport unit suite 20/20 under Node 22.14 (was 19/20), full
599 unit suite and the media-upload integration suite green on Node 24.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent fff9fce commit 747a8ee
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
209 | 212 | | |
210 | 213 | | |
211 | 214 | | |
212 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
213 | 220 | | |
214 | 221 | | |
215 | 222 | | |
| |||
0 commit comments