From c5193ca01870ab088fc460a3a487a4791c6cc042 Mon Sep 17 00:00:00 2001 From: Kamil Gabryjelski Date: Mon, 14 Sep 2020 19:40:20 +0200 Subject: [PATCH] Re-enable rule no-non-null-assertion (#10864) --- superset-frontend/.eslintrc.js | 1 - .../src/components/FilterableTable/FilterableTable.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/superset-frontend/.eslintrc.js b/superset-frontend/.eslintrc.js index 27c1bcca01..30abc8c597 100644 --- a/superset-frontend/.eslintrc.js +++ b/superset-frontend/.eslintrc.js @@ -59,7 +59,6 @@ module.exports = { '@typescript-eslint/ban-types': 0, // disabled temporarily '@typescript-eslint/no-empty-function': 0, '@typescript-eslint/no-explicit-any': 0, - '@typescript-eslint/no-non-null-assertion': 0, // disabled temporarily '@typescript-eslint/no-use-before-define': 1, // disabled temporarily '@typescript-eslint/no-unused-vars': 0, // disabled temporarily '@typescript-eslint/explicit-function-return-type': 0, diff --git a/superset-frontend/src/components/FilterableTable/FilterableTable.tsx b/superset-frontend/src/components/FilterableTable/FilterableTable.tsx index 34b44e7f5b..d320b0c972 100644 --- a/superset-frontend/src/components/FilterableTable/FilterableTable.tsx +++ b/superset-frontend/src/components/FilterableTable/FilterableTable.tsx @@ -289,7 +289,7 @@ export default class FilterableTable extends PureComponent< } fitTableToWidthIfNeeded() { - const containerWidth = this.container.current!.clientWidth; + const containerWidth = this.container.current?.clientWidth ?? 0; if (this.totalTableWidth < containerWidth) { // fit table width if content doesn't fill the width of the container this.totalTableWidth = containerWidth;