Skip to content

Commit

Permalink
The instr and resources.json missing warning log corrections, touch #564
Browse files Browse the repository at this point in the history
.
  • Loading branch information
PaulDalek committed Aug 6, 2024
1 parent 97ab0ca commit 8a7b945
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 4.0.3

_Fixes:_

- Fixed the warning message when the the default `resources.json` file is not found.
- Fixed the problem with the lack of the `instr` value, when the `options` is set instead.
- Corrected the `Node.js Module` example in the README.

# 4.0.2

_Hotfix_:
Expand Down
9 changes: 4 additions & 5 deletions lib/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ export const startExport = async (settings, endCallback) => {
try {
log(4, '[chart] Attempting to export from a raw input.');

// Use whichever one is available
exportOptions.instr = exportOptions.instr || exportOptions.options;

// Perform a direct inject when forced
if (toBoolean(options.customLogic?.allowCodeExecution)) {
return doStraightInject(options, endCallback);
Expand Down Expand Up @@ -321,11 +324,7 @@ const doExport = async (options, chartJson, endCallback, svg) => {
toBoolean(options.customLogic.allowFileResources)
);
} catch (error) {
logWithStack(
2,
error,
`[chart] Unable to load the default resources.json file.`
);
log(2, `[chart] Unable to load the default resources.json file.`);
}
}
}
Expand Down

0 comments on commit 8a7b945

Please sign in to comment.