Skip to content

Commit

Permalink
Simplify with Observerable.from
Browse files Browse the repository at this point in the history
  • Loading branch information
ericclemmons authored May 20, 2020
1 parent 280e685 commit 6f92a34
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/core/src/Util/Reachability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ type NetworkStatus = {
export default class ReachabilityNavigator implements Reachability {
networkMonitor(): Observable<NetworkStatus> {
if (JS.browserOrNode().isNode) {
return new Observable(observer => {
observer.next({ online: true });

return () => {};
});
return Observable.from({ online: true });
}

return new Observable(observer => {
Expand Down

0 comments on commit 6f92a34

Please sign in to comment.