Skip to content

Commit

Permalink
fix(shared): Update session storge methods
Browse files Browse the repository at this point in the history
  • Loading branch information
iacoshoria committed Oct 8, 2020
1 parent ad39232 commit 2e6e5af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/earth-shared/src/services/SessionStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ interface Storage {
get(key: string): string;
getObject(key: string, defaultValue?: any): any;
remove(key: string): void;
add(key: string, value: string): string;
add(key: string, value: string): void;
}

class SessionStorage implements Storage {
constructor() {}

add(key: string, value: string): string {
return '';
add(key: string, value: string): void {
return sessionStorage.setItem(key, value);
}

get(key: string): string {
Expand All @@ -46,7 +46,7 @@ class SessionStorage implements Storage {
}

remove(key: string): void {
sessionStorage.removeItem(key);
return sessionStorage.removeItem(key);
}
}

Expand Down

0 comments on commit 2e6e5af

Please sign in to comment.