Skip to content

Commit

Permalink
fix: simplify check hasFunction (#11490)
Browse files Browse the repository at this point in the history
  • Loading branch information
Connormiha committed Sep 11, 2023
1 parent e74ee7b commit ca77bed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/core.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ca77bed

Please sign in to comment.