From 1b0c9c0e2e6e82875b34f7866450be25e5643fed Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Tue, 31 Oct 2023 20:09:10 +0700 Subject: [PATCH] avoid an extra check --- packages/core-js/modules/es.reflect.prevent-extensions.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core-js/modules/es.reflect.prevent-extensions.js b/packages/core-js/modules/es.reflect.prevent-extensions.js index b300f3d08b99..fa87fc11e1bf 100644 --- a/packages/core-js/modules/es.reflect.prevent-extensions.js +++ b/packages/core-js/modules/es.reflect.prevent-extensions.js @@ -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;