From 43bbb9ba2e091bc8956a436018b38c4006588fcb Mon Sep 17 00:00:00 2001 From: Enzo Martellucci Date: Sun, 29 Sep 2024 20:13:26 +0200 Subject: [PATCH] lint --- superset-frontend/src/components/Chart/Chart.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/superset-frontend/src/components/Chart/Chart.tsx b/superset-frontend/src/components/Chart/Chart.tsx index 358108323b5c0..7c90bb5ba5c3a 100644 --- a/superset-frontend/src/components/Chart/Chart.tsx +++ b/superset-frontend/src/components/Chart/Chart.tsx @@ -130,7 +130,7 @@ const defaultProps: Partial = { isInView: true, }; -const Styles = styled.div<{ height: number, width?: number }>` +const Styles = styled.div<{ height: number; width?: number }>` min-height: ${p => p.height}px; position: relative; text-align: center; @@ -329,17 +329,13 @@ class Chart extends PureComponent { const isLoading = chartStatus === 'loading'; - if (chartStatus === 'failed') { return queriesResponse.map(item => - this.renderErrorMessage(item as ChartErrorType ), + this.renderErrorMessage(item as ChartErrorType), ); } - if ( - errorMessage && - ensureIsArray(queriesResponse).length === 0 - ) { + if (errorMessage && ensureIsArray(queriesResponse).length === 0) { return ( { height={height} width={width} > - {isLoading ? this.renderSpinner(databaseName) : this.renderChartContainer()}