Skip to content

Commit

Permalink
avoid an extra check
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Oct 31, 2023
1 parent f462bd5 commit 600f86e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/core-js/modules/es.reflect.prevent-extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ $({ target: 'Reflect', stat: true }, {
preventExtensions: function preventExtensions(target) {
anObject(target);
try {
var objectPreventExtensions = getBuiltInStaticMethod('Object', 'preventExtensions');
if (objectPreventExtensions) objectPreventExtensions(target);
getBuiltInStaticMethod('Object', 'preventExtensions')(target);
return true;
} catch (error) {
return false;
Expand Down

0 comments on commit 600f86e

Please sign in to comment.