Skip to content

Commit

Permalink
fix regression of some IE8- issues
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Jun 24, 2022
1 parent 93598ce commit e0e8799
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Changelog
##### Unreleased
- Nothing
- Fixed regression of some IE8- issues

##### [3.23.2 - 2022.06.21](https://github.com/zloirock/core-js/releases/tag/v3.23.2)
- Avoided creation of extra properties for the handling of `%TypedArray%` constructors in new methods, [#1092 (comment)](https://github.com/zloirock/core-js/issues/1092#issuecomment-1158760512)
Expand Down
6 changes: 4 additions & 2 deletions packages/core-js/internals/define-built-in.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ module.exports = function (O, key, value, options) {
if (simple) O[key] = value;
else defineGlobalProperty(key, value);
} else {
if (!options.unsafe) delete O[key];
else if (O[key]) simple = true;
try {
if (!options.unsafe) delete O[key];
else if (O[key]) simple = true;
} catch (error) { /* empty */ }
if (simple) O[key] = value;
else definePropertyModule.f(O, key, {
value: value,
Expand Down
3 changes: 2 additions & 1 deletion packages/core-js/internals/make-built-in.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ var makeBuiltIn = module.exports = function (value, name, options) {
if (options && options.getter) name = 'get ' + name;
if (options && options.setter) name = 'set ' + name;
if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
defineProperty(value, 'name', { value: name, configurable: true });
if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
else value.name = name;
}
if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
defineProperty(value, 'length', { value: options.arity });
Expand Down

0 comments on commit e0e8799

Please sign in to comment.