Skip to content

Commit cf6327a

Browse files
authored
Merge pull request #236 from ionic-team/fix/encryptedStore
fix(secure-storage): modify the driver check
2 parents 5b4bf20 + aed3b31 commit cf6327a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ export class Storage {
159159
}
160160

161161
setEncryptionKey(key: string) {
162-
if (this.driver !== 'ionicSecureStorage') {
162+
if (!this._secureStorageDriver) {
163163
throw new Error('@ionic-enterprise/secure-storage not installed. Encryption support not available');
164164
} else {
165165
(this._secureStorageDriver as any)?.setEncryptionKey(key);
166166
}
167167
}
168-
}
168+
}

0 commit comments

Comments
 (0)