From d5919d17366f75febaa9070ad2c4f28569bbbd6a Mon Sep 17 00:00:00 2001 From: Elias Boukamza Date: Wed, 17 May 2017 12:45:54 +0200 Subject: [PATCH 1/2] fix(secure-storage): reject the promise if the plugin doesn't exist (#1562) --- src/@ionic-native/plugins/secure-storage/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/@ionic-native/plugins/secure-storage/index.ts b/src/@ionic-native/plugins/secure-storage/index.ts index ab7a5b99f..284b70a89 100644 --- a/src/@ionic-native/plugins/secure-storage/index.ts +++ b/src/@ionic-native/plugins/secure-storage/index.ts @@ -8,7 +8,7 @@ declare var cordova: any; */ export class SecureStorageObject { - constructor(private _objectInstance?: any) { } + constructor(private _objectInstance: any) { } /** * Gets a stored item @@ -125,7 +125,7 @@ export class SecureStorage extends IonicNativePlugin { if (checkAvailability('cordova.plugins.SecureStorage', null, 'SecureStorage') === true) { const instance = new cordova.plugins.SecureStorage(() => res(new SecureStorageObject(instance)), rej, store); } else { - res(new SecureStorageObject()); + rej('SecureStorage failure: cordova plugin is not available'); } }); } From 5145395dd7bea7d2fb81b11b356a4a7497c607e7 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Wed, 17 May 2017 12:47:35 +0200 Subject: [PATCH 2/2] docs(template): fix install command (#1572) --- scripts/docs/templates/common.template.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docs/templates/common.template.html b/scripts/docs/templates/common.template.html index 496ac51ec..26bc1b398 100644 --- a/scripts/docs/templates/common.template.html +++ b/scripts/docs/templates/common.template.html @@ -165,7 +165,7 @@ docType: "<$ doc.docType $>" <@ endif @> <# --- Install commands --- #> -
$ <@ if prop.install @><$ prop.install $><@ else @>ionic plugin add --save <$ prop.plugin $><@ endif @>
+
$ <@ if prop.install @><$ prop.install $><@ else @>ionic cordova plugin add <$ prop.plugin $><@ endif @>
 $ npm install --save @ionic-native/<$ doc.npmId $>
 

Repo: