Skip to content

Commit

Permalink
fix(Network): Add event listener for offline instead of remove in com…
Browse files Browse the repository at this point in the history
…ponentDidMount (jaredpalmer#21)
  • Loading branch information
Sam Kvale authored and jaredpalmer committed Nov 17, 2017
1 parent b089a61 commit e51c656
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Network/Network.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class Network extends React.Component<

componentDidMount() {
window.addEventListener("online", this.handleOnline);
window.removeEventListener("offline", this.handleOffline);
window.addEventListener("offline", this.handleOffline);
}

componentWillUnmount() {
Expand Down

0 comments on commit e51c656

Please sign in to comment.