From: Mikhail Date: Mon, 11 Sep 2023 06:31:29 +0000 (+0300) Subject: fix: simplify check hasFunction (#11490) X-Git-Tag: v4.4.1~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca77bed3189d2b0fd6c2cd02325b337ed5f71505;p=thirdparty%2FChart.js.git fix: simplify check hasFunction (#11490) --- diff --git a/src/core/core.config.js b/src/core/core.config.js index 209e87291..6e83d5de3 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);