WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2025-04-17 05:07:10 PDT
<
rdar://problem/149470140
>
Yusuke Suzuki
Comment 2
2025-04-17 05:08:42 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/44190
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.
Top of Page
Format For Printing
XML
Clone This Bug