From 5644063fc7856867a1606db19117415d725f37b6 Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Sun, 7 Feb 2021 21:27:18 +0530 Subject: [PATCH] remove ts ignore --- src/components/App.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index f74fb54fe..0f4f7f056 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -884,16 +884,21 @@ class App extends React.Component { prevState.showStats !== this.state.showStats || prevProps.isCollaborating !== this.props.isCollaborating ) { + const navigator: Navigator & { + connection?: { + addEventListener: Function; + removeEventListener: Function; + }; + } = window.navigator; + if (this.state.showStats && this.props.isCollaborating) { this.calculateNetStats(); - // @ts-ignore navigator?.connection?.addEventListener( "change", this.calculateNetStats, ); } else { - // @ts-ignore navigator?.connection?.removeEventListener( "change", this.calculateNetStats,