From 3277e3b79a5768758cc0063d3451560873d5a324 Mon Sep 17 00:00:00 2001 From: Mikhail Bodrov Date: Thu, 7 Sep 2023 11:37:17 +0300 Subject: [PATCH] fix: simplify check hasFunction --- src/core/core.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/core.config.js b/src/core/core.config.js index 209e87291ab..6e83d5de327 100644 --- a/src/core/core.config.js +++ b/src/core/core.config.js @@ -400,7 +400,7 @@ function getResolver(resolverCache, scopes, prefixes) { } const hasFunction = value => isObject(value) - && Object.getOwnPropertyNames(value).reduce((acc, key) => acc || isFunction(value[key]), false); + && Object.getOwnPropertyNames(value).some((key) => isFunction(value[key])); function needContext(proxy, names) { const {isScriptable, isIndexable} = _descriptors(proxy);