zloirock / core-js

Standard Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spec mismatch in `Array.prototype.lastIndexOf`

stonechoe opened this issue · comments

Following code behaves differently depending on whether the native version is loaded, or if the polyfill is required and loaded:

let lastIndexOf = require("core-js-pure/es/array/last-index-of");

lastIndexOf([], 0, {
  valueOf: function () {
    throw 42;
  },
});