fix(pro): Tweak to pro plugin. #2136 #2127

This commit is contained in:
Max Lynch 2018-01-25 11:35:19 -06:00
parent eaa87fae9b
commit c8ecee01d6

View File

@ -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';
/**
@ -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