Skip to content

Commit

Permalink
fix(authentication-client): Do not trigger storage methods if storage…
Browse files Browse the repository at this point in the history
… not defined (#3210)
  • Loading branch information
foxhound87 committed Jun 14, 2023
1 parent b8e2769 commit 261acbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/authentication-client/src/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ export class StorageWrapper implements Storage {
}

getItem(key: string) {
return Promise.resolve(this.storage.getItem(key))
return Promise.resolve(this.storage?.getItem(key))
}

setItem(key: string, value: any) {
return Promise.resolve(this.storage.setItem(key, value))
return Promise.resolve(this.storage?.setItem(key, value))
}

removeItem(key: string) {
Expand Down

0 comments on commit 261acbc

Please sign in to comment.