You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Iterator.prototype.flatMap FORCED check misses Safari 18.6 and 26.0.x bug(s) #1538
Iterator.prototype.flatMap throws TypeError: undefined is not a function on Safari 18.6 and 26.0.x when consumed by a short-circuiting helper over arrays. With import "core-js/actual", the FORCED check sees a callable native and skips installation, so the buggy native runs.
Reproduction (throws on Safari 18.6 and 26.0.1, passes elsewhere):
[1].values().flatMap(()=>[1]).find(()=>true);
Cause:
Apple's Safari 26.2 release notes describe the 26.x bug: "Fixed Iterator.prototype.flatMap to properly handle iterators without a return method" (rdar://158783404). The 18.x failure is not separately documented but the same probe triggers and the same workaround resolves it — either the same bug exists undocumented in 18.x, or a different bug surfaces similarly. Either way, behavioral detection catches both.
Proposed fix:
Add a probe to the FORCED check for es.iterator.flat-map:
Activity
zloirock commentedon May 5, 2026
Thanks. Could you add a PR?
zloirock commentedon Jul 25, 2026
Are you sure that it's still present in the actual
core-jsversion? Since that refers to https://bugs.webkit.org/show_bug.cgi?id=297532, which was fixed incore-js@3.48.zloirock commentedon Jul 25, 2026
It seems that in this WebKit ticket was only a part of this issue.
add detection of missed Webkit ~ Safari < 26.2 `Iterator.prototype.fl…
markedwards commentedon Jul 25, 2026
Thanks!