]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
fix: simplify check hasFunction (#11490)
authorMikhail <bodrovmiha@yandex.ru>
Mon, 11 Sep 2023 06:31:29 +0000 (09:31 +0300)
committerGitHub <noreply@github.com>
Mon, 11 Sep 2023 06:31:29 +0000 (08:31 +0200)
src/core/core.config.js

index 209e87291ab36a27d2de205a5621415640120389..6e83d5de327949b13e5cf4f4f6229f57c2dd66f2 100644 (file)
@@ -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);