Skip to content

Commit

Permalink
fix(pro): Tweak to pro plugin. #2136 #2127
Browse files Browse the repository at this point in the history
  • Loading branch information
mlynch committed Jan 25, 2018
1 parent eaa87fa commit c8ecee0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/@ionic-native/plugins/pro/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, CordovaInstance, IonicNativePlugin } from '@ionic-native/core';
import { Plugin, Cordova, CordovaCheck, CordovaInstance, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';

/**
Expand Down Expand Up @@ -130,10 +130,16 @@ export class ProDeploy {
})
@Injectable()
export class Pro extends IonicNativePlugin {
_deploy: ProDeploy;

/**
* Ionic Pro Deploy .js API.
*/
deploy: ProDeploy = new ProDeploy((Pro.getPlugin() || {}).deploy);
@CordovaCheck()
deploy(): ProDeploy {
if (this._deploy) return this._deploy;
else return this._deploy = new ProDeploy(Pro.getPlugin().deploy);
}

/**
* Not yet implemented
Expand Down

0 comments on commit c8ecee0

Please sign in to comment.