Skip to content

Commit

Permalink
chore(*): atualizando lib ionic-native
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciusgandrade committed Mar 28, 2017
1 parent 430a145 commit 048a229
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@mbamobi/http": "^1.0.0",
"ionic-angular": "^2.0.0-rc.1",
"@ionic-native/core": "3.1.0",
"@ionic-native/network": "^3.3.1",
"rxjs": "5.0.0-beta.12",
"zone.js": "^0.6.21"
},
Expand Down
5 changes: 3 additions & 2 deletions src/providers/no-connection.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Network } from '@ionic-native/network';
import { Injectable } from '@angular/core';
import { PreRequestPlugin } from '@mbamobi/http';
import { Network } from 'ionic-native';
import { NoConnectionException } from './exception';

@Injectable()
export class NoConnectionPlugin implements PreRequestPlugin {
constructor(private network: Network) {}

getPriority(): number {
return 0;
Expand All @@ -15,7 +16,7 @@ export class NoConnectionPlugin implements PreRequestPlugin {
}

preRequest() {
if (Network.type === 'none') {
if (this.network.type === 'none') {
throw new NoConnectionException('Not Connection');
}
}
Expand Down

0 comments on commit 048a229

Please sign in to comment.