Skip to content

Commit

Permalink
Fixing default store bug
Browse files Browse the repository at this point in the history
  • Loading branch information
baptistegreve committed Apr 27, 2023
1 parent 8d0f9d7 commit d2279a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@orbisclub/orbis-sdk",
"version": "0.4.51",
"version": "0.4.52",
"description": "Official package to implement quickly an Orbis powered decentralized social layer within your application.",
"author": "Baptiste Grève",
"license": "ISC",
Expand Down
7 changes: 3 additions & 4 deletions store.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class Store {
switch (this.storeAsync) {
/** Browser storage */
case false:
this.type.setItem(key, value);
localStorage.setItem(key, value);
return true;

/** Async storage */
Expand All @@ -36,12 +36,11 @@ export class Store {

/** Function to retrieve an item storage */
async getItem(key) {

let res;
switch (this.storeAsync) {
/** Browser storage */
case false:
res = this.type.getItem(key);
res = localStorage.getItem(key);
break;

/** Async storage */
Expand All @@ -57,7 +56,7 @@ export class Store {
switch (this.storeAsync) {
/** Browser storage */
case false:
this.type.removeItem(key);
localStorage.removeItem(key);
return true;

/** Async storage */
Expand Down

0 comments on commit d2279a4

Please sign in to comment.