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/instr-and-resources-error #628

Open
wants to merge 1 commit 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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 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.

# 4.0.2

_Hotfix_:
Expand Down
2 changes: 0 additions & 2 deletions dist/index.cjs

This file was deleted.

2 changes: 0 additions & 2 deletions dist/index.esm.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/index.esm.js.map

This file was deleted.

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
6 changes: 1 addition & 5 deletions lib/highcharts.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,7 @@ export async function triggerExport(chartOptions, options, displayErrors) {
let constr = options.export.constr || 'chart';
constr = typeof Highcharts[constr] !== 'undefined' ? constr : 'chart';

Highcharts[constr](
'container',
finalOptions,
finalCallback
);
Highcharts[constr]('container', finalOptions, finalCallback);

// Get the current global options
const defaultOptions = getOptions();
Expand Down
4 changes: 2 additions & 2 deletions 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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "Highsoft AS <[email protected]> (http://www.highcharts.com/about)",
"license": "MIT",
"type": "module",
"version": "4.0.2",
"version": "4.0.3",
"main": "./dist/index.esm.js",
"engines": {
"node": ">=18.12.0"
Expand Down
Loading