web/polyfill: actually fix iterator map

This commit is contained in:
Tulir Asokan 2024-11-04 11:50:52 +01:00
parent ffa2b0fd51
commit 24dea86c9e

View file

@ -15,7 +15,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
if (!window.Iterator?.prototype.map) {
(new Map([])).__proto__.map = function(callbackFn) {
(new Map([])).keys().__proto__.map = function(callbackFn) {
const output = []
let i = 0
for (const item of this) {