From 99af8db0e8d12caacf498064f927a5ed78e4a3b3 Mon Sep 17 00:00:00 2001 From: PawelDalek Date: Mon, 25 Nov 2024 17:26:50 +0100 Subject: [PATCH] Revert "564/resources-error" --- CHANGELOG.md | 8 -------- lib/chart.js | 9 +++++---- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 485bbc8e..9254b1bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,3 @@ -# 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_: diff --git a/lib/chart.js b/lib/chart.js index 731d2c7a..47b28f8d 100644 --- a/lib/chart.js +++ b/lib/chart.js @@ -97,9 +97,6 @@ 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); @@ -324,7 +321,11 @@ const doExport = async (options, chartJson, endCallback, svg) => { toBoolean(options.customLogic.allowFileResources) ); } catch (error) { - log(2, `[chart] Unable to load the default resources.json file.`); + logWithStack( + 2, + error, + `[chart] Unable to load the default resources.json file.` + ); } } }