Skip to content

Commit ca77bed

Browse files
authored
fix: simplify check hasFunction (#11490)
1 parent e74ee7b commit ca77bed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/core.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ function getResolver(resolverCache, scopes, prefixes) {
400400
}
401401

402402
const hasFunction = value => isObject(value)
403-
&& Object.getOwnPropertyNames(value).reduce((acc, key) => acc || isFunction(value[key]), false);
403+
&& Object.getOwnPropertyNames(value).some((key) => isFunction(value[key]));
404404

405405
function needContext(proxy, names) {
406406
const {isScriptable, isIndexable} = _descriptors(proxy);

0 commit comments

Comments
 (0)