You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/09/02 05:13:52 UTC

[GitHub] [incubator-superset] rusackas commented on a change in pull request #10740: chore: Simple Eslint cleanup ✨

rusackas commented on a change in pull request #10740:
URL: https://github.com/apache/incubator-superset/pull/10740#discussion_r481708415



##########
File path: superset-frontend/src/components/FilterableTable/FilterableTable.tsx
##########
@@ -290,7 +290,7 @@ export default class FilterableTable extends PureComponent<
   }
 
   fitTableToWidthIfNeeded() {
-    const containerWidth = this.container.current!.clientWidth;
+    const containerWidth = this.container?.current?.clientWidth ?? 0;

Review comment:
       The cascade of TS workarounds turned out to be nearly as goofy... so I just pulled the function's logic into `componentDidMount` since it's not used elsewhere anyway... and all is well.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org