Skip to content

Commit

Permalink
Patch: option scope might not be an object (#8789)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle committed Apr 2, 2021
1 parent 8780e15 commit 98e890c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
"name": "chart.js",
"homepage": "https://www.chartjs.org",
"description": "Simple HTML5 charts using the canvas element.",
"version": "3.0.0",
"version": "3.0.1",
"license": "MIT",
"jsdelivr": "dist/chart.min.js",
"unpkg": "dist/chart.min.js",
Expand Down
5 changes: 3 additions & 2 deletions src/helpers/helpers.config.js
Expand Up @@ -276,9 +276,10 @@ function createSubResolver(parentScopes, resolver, prop, value) {
const fallback = resolveFallback(resolver._fallback, prop, value);
const allScopes = [...parentScopes, ...rootScopes];
const set = new Set();
if (!(prop in parentScopes[0])) {
const firstParent = parentScopes[0];
if (isObject(firstParent) && !(prop in firstParent)) {
// create an empty scope for possible stored values, so we always set the values in top scope.
set.add(parentScopes[0][prop] = {});
set.add(firstParent[prop] = {});
}
set.add(value);
let key = addScopesFromKey(set, allScopes, prop, fallback || prop);
Expand Down

0 comments on commit 98e890c

Please sign in to comment.