Skip to content

Commit d32d52b

Browse files
committed
drop IE8- unshift fix
1 parent 92602a9 commit d32d52b

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

packages/core-js/modules/es.array.unshift.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ var setArrayLength = require('../internals/array-set-length');
66
var deletePropertyOrThrow = require('../internals/delete-property-or-throw');
77
var doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');
88

9-
// IE8-
10-
var INCORRECT_RESULT = [].unshift(0) !== 1;
11-
129
// V8 ~ Chrome < 71 and Safari <= 15.4, FF < 23 throws InternalError
1310
var properErrorOnNonWritableLength = function () {
1411
try {
@@ -18,7 +15,7 @@ var properErrorOnNonWritableLength = function () {
1815
}
1916
};
2017

21-
var FORCED = INCORRECT_RESULT || !properErrorOnNonWritableLength();
18+
var FORCED = !properErrorOnNonWritableLength();
2219

2320
// `Array.prototype.unshift` method
2421
// https://tc39.es/ecma262/#sec-array.prototype.unshift

tests/compat/tests.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,6 @@ GLOBAL.tests = {
859859
return Array.prototype[Symbol.unscopables].flatMap;
860860
},
861861
'es.array.unshift': function () {
862-
if ([].unshift(0) !== 1) return false;
863862
try {
864863
Object.defineProperty([], 'length', { writable: false }).unshift();
865864
} catch (error) {

0 commit comments

Comments
 (0)