Skip to content

Commit be0c3eb

Browse files
authored
Merge pull request #628 from highcharts/564/instr-and-resources-error
564/instr-and-resources-error
2 parents 02119e9 + cc8a02e commit be0c3eb

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ _Fixes:_
1111
- Fixed an issue where the chart constructor was sometimes incorrectly set, causing the export to fail
1212
- Added referrers to CDN cache fetches on first startup/install.
1313
- Fixed an issue that would sometimes cause cause a crash due to fail due to `Accept-Ranges` headers
14+
- Fixed the warning message when the the default `resources.json` file is not found.
15+
- Fixed the problem with the lack of the `instr` value, when the `options` is set instead
1416

1517
_New Features:_
1618

dist/index.cjs

Lines changed: 3 additions & 2 deletions
Large diffs are not rendered by default.

dist/index.esm.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.esm.js.map

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/chart.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ export const startExport = async (settings, endCallback) => {
9797
try {
9898
log(4, '[chart] Attempting to export from a raw input.');
9999

100+
// Use whichever one is available
101+
exportOptions.instr = exportOptions.instr || exportOptions.options;
102+
100103
// Perform a direct inject when forced
101104
if (toBoolean(options.customLogic?.allowCodeExecution)) {
102105
return doStraightInject(options, endCallback);
@@ -321,11 +324,7 @@ const doExport = async (options, chartJson, endCallback, svg) => {
321324
toBoolean(options.customLogic.allowFileResources)
322325
);
323326
} catch (error) {
324-
logWithStack(
325-
2,
326-
error,
327-
`[chart] Unable to load the default resources.json file.`
328-
);
327+
log(2, `[chart] Unable to load the default resources.json file.`);
329328
}
330329
}
331330
}

0 commit comments

Comments
 (0)