mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Fix for crash while inspecting charts
This commit is contained in:
parent
100e4ef28e
commit
7e95b24f28
1 changed files with 5 additions and 1 deletions
|
|
@ -26,7 +26,11 @@ export const Chart = function Chart({
|
|||
|
||||
const dataProperty = component.definition.properties.data;
|
||||
const dataString = dataProperty ? dataProperty.value : [];
|
||||
const data = JSON.parse(dataString);
|
||||
|
||||
let data = [];
|
||||
try {
|
||||
data = JSON.parse(dataString);
|
||||
} catch (err) { console.log(err); }
|
||||
|
||||
const titleProperty = component.definition.properties.title;
|
||||
const title = titleProperty.value;
|
||||
|
|
|
|||
Loading…
Reference in a new issue