Use right clear error

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
Tilman Vatteroth 2020-09-30 21:57:58 +02:00 committed by mrdrogdrog
parent 091b225672
commit 192f66d169

View file

@ -44,7 +44,7 @@ export const VegaChart: React.FC<VegaChartProps> = ({ code }) => {
SVG_ACTION: t('renderer.vega-lite.svg') SVG_ACTION: t('renderer.vega-lite.svg')
} }
}) })
.then(() => showError('')) .then(() => setError(undefined))
.catch(err => showError(err)) .catch(err => showError(err))
} catch (err) { } catch (err) {
showError(t('renderer.vega-lite.errorJson')) showError(t('renderer.vega-lite.errorJson'))