zloirock / core-js

Standard Library
MIT License
23.99k stars 1.62k forks source link

Fix Object.setPrototypeOf #1330

Closed stonechoe closed 3 months ago

stonechoe commented 3 months ago

This PR is about fixing issue/1329

const f = require('core-js-pure/actual/object/set-prototype-of');
f(1, {}) === 1; // This should be true, without throwing

Object.setPrototypeOf should not throw when O is coercible - This is the related spec