From 46ef41fb0c559b14023af1ad8b2584956528dc82 Mon Sep 17 00:00:00 2001 From: Sherfin Shamsudeen Date: Tue, 8 Feb 2022 08:21:48 +0530 Subject: [PATCH] Read safely from plotly-json properties to avoid crash on existing charts (#2193) --- frontend/src/Editor/Inspector/Components/Chart.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/Editor/Inspector/Components/Chart.jsx b/frontend/src/Editor/Inspector/Components/Chart.jsx index 9cc22fb3d8..b4fbd193fa 100644 --- a/frontend/src/Editor/Inspector/Components/Chart.jsx +++ b/frontend/src/Editor/Inspector/Components/Chart.jsx @@ -63,7 +63,7 @@ class Chart extends React.Component { const jsonDescription = this.state.component.component.definition.properties.jsonDescription; const plotFromJson = resolveReferences( - this.state.component.component.definition.properties.plotFromJson.value, + this.state.component.component.definition.properties.plotFromJson?.value, currentState ); @@ -105,7 +105,7 @@ class Chart extends React.Component { children: (