Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

564/resources-error #604

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ _New Features:_

_Fixes_:

- Improved status codes (user errors instead of 500) [(#577)](https://github.com/highcharts/node-export-server/pull/577)

- Improved memory management/usage [(#586)](https://github.com/highcharts/node-export-server/pull/586)
- 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.
- Improved status codes (user errors instead of 500) [(#577)](https://github.com/highcharts/node-export-server/pull/577).
- Improved memory management/usage [(#586)](https://github.com/highcharts/node-export-server/pull/586).

_Other:_

- Add fair usage policy note on the page [(#583)](https://github.com/highcharts/node-export-server/pull/583)
- Add fair usage policy note on the page [(#583)](https://github.com/highcharts/node-export-server/pull/583).

# 4.0.2

Expand Down
9 changes: 4 additions & 5 deletions lib/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,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 @@ -324,11 +327,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
Loading