This commit is contained in:
tiago.kayaya
2021-08-20 12:31:14 +01:00
parent 126e62d587
commit f006cd6112
+7 -3
View File
@@ -16,15 +16,19 @@ const { Storage } = Plugins; */
// Get the value
async get(key: string) {
const ret = await this.storage.get(key).then((val) => { return val; });
return JSON.parse(unescape(atob(ret)));
try {
return JSON.parse(unescape(atob(ret)));
} catch (error) {
return unescape(atob(ret))
}
}
async remove(key: string){
await this.storage.remove(key);
}
/*
/*
// Get the value
async get(storageKey: string) {
const ret = await Storage.get({ key: storageKey });