Skip to content

Commit 323a558

Browse files
committed
fix TS error on ConnectionStatusBar NetInfo.fetch
1 parent 03a695c commit 323a558

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/connectionStatusBar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class ConnectionStatusBar extends PureComponent<ConnectionStatusBarProps, Connec
8989
}
9090

9191
async getInitialConnectionState() {
92-
const isConnected = (await NetInfo?.fetch()).isConnected;
92+
const isConnected = (await NetInfo?.fetch())?.isConnected;
9393

9494
this.setState({isConnected});
9595
if (this.props.onConnectionChange) {

0 commit comments

Comments
 (0)