Skip to content

Commit

Permalink
fix(secure-storage): reject the promise if the plugin doesn't exist (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
eboukamza authored and ihadeed committed May 17, 2017
1 parent 4c8deb2 commit d5919d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/@ionic-native/plugins/secure-storage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ declare var cordova: any;
*/
export class SecureStorageObject {

constructor(private _objectInstance?: any) { }
constructor(private _objectInstance: any) { }

/**
* Gets a stored item
Expand Down Expand Up @@ -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');
}
});
}
Expand Down

0 comments on commit d5919d1

Please sign in to comment.