mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-10-27 17:04:26 +01:00
remove ts ignore
This commit is contained in:
@@ -884,16 +884,21 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||||||
prevState.showStats !== this.state.showStats ||
|
prevState.showStats !== this.state.showStats ||
|
||||||
prevProps.isCollaborating !== this.props.isCollaborating
|
prevProps.isCollaborating !== this.props.isCollaborating
|
||||||
) {
|
) {
|
||||||
|
const navigator: Navigator & {
|
||||||
|
connection?: {
|
||||||
|
addEventListener: Function;
|
||||||
|
removeEventListener: Function;
|
||||||
|
};
|
||||||
|
} = window.navigator;
|
||||||
|
|
||||||
if (this.state.showStats && this.props.isCollaborating) {
|
if (this.state.showStats && this.props.isCollaborating) {
|
||||||
this.calculateNetStats();
|
this.calculateNetStats();
|
||||||
|
|
||||||
// @ts-ignore
|
|
||||||
navigator?.connection?.addEventListener(
|
navigator?.connection?.addEventListener(
|
||||||
"change",
|
"change",
|
||||||
this.calculateNetStats,
|
this.calculateNetStats,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// @ts-ignore
|
|
||||||
navigator?.connection?.removeEventListener(
|
navigator?.connection?.removeEventListener(
|
||||||
"change",
|
"change",
|
||||||
this.calculateNetStats,
|
this.calculateNetStats,
|
||||||
|
|||||||
Reference in New Issue
Block a user