Skip to content

Commit

Permalink
IE10 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Jul 28, 2021
1 parent 9aca290 commit 0a66ab1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core-js/internals/array-group-by.js
@@ -1,5 +1,4 @@
var bind = require('../internals/function-bind-context');
var has = require('../internals/has');
var IndexedObject = require('../internals/indexed-object');
var toObject = require('../internals/to-object');
var toLength = require('../internals/to-length');
Expand All @@ -20,7 +19,9 @@ module.exports = function ($this, callbackfn, that, specificConstructor) {
for (;length > index; index++) {
value = self[index];
key = toPropertyKey(boundFunction(value, index, O));
if (has(target, key)) push.call(target[key], value);
// in some IE10 builds, `hasOwnProperty` returns incorrect result on integer keys
// but since it's a `null` prototype object, we can safely use `in`
if (key in target) push.call(target[key], value);
else target[key] = [value];
}
if (specificConstructor) {
Expand Down

0 comments on commit 0a66ab1

Please sign in to comment.