RESOLVED FIXED 291651
[JSC] Iterator.prototype.reduce fails with `undefined` initial parameter
https://bugs.webkit.org/show_bug.cgi?id=291651
Summary [JSC] Iterator.prototype.reduce fails with `undefined` initial parameter
marcel laverdet
Reported 2025-04-16 15:39:56 PDT
The specification for this function is pretty cut and dry. "Not present" is not the same as `undefined`. > Iterator.from([]).reduce(() => false, undefined) TypeError: Iterator.prototype.reduce requires an initial value or an iterator that is not done. Chrome agrees that the result of this expression is `undefined`.
Attachments
Radar WebKit Bug Importer
Comment 1 2025-04-17 05:07:10 PDT
Yusuke Suzuki
Comment 2 2025-04-17 05:08:42 PDT
EWS
Comment 3 2025-04-17 08:42:50 PDT
Committed 293797@main (cc66425b1afa): <https://commits.webkit.org/293797@main> Reviewed commits have been landed. Closing PR #44190 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.