Skip to content

Commit

Permalink
fix: mv2 crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Mar 28, 2024
1 parent 12d66c8 commit 7c46f08
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ const inMemoryPassword = {
},
set value(value) {
this[' value'] = value
if (!value) browser.storage.session.clear()
else browser.storage.session.set({ [key]: value, [atKey]: Date.now() })
if (!value) browser.storage.session?.clear()
else browser.storage.session?.set({ [key]: value, [atKey]: Date.now() })
},
}
browser.storage.session.get([key, atKey]).then(async (result) => {
browser.storage.session?.get([key, atKey]).then(async (result) => {
if (Date.now() - result[atKey] > (await database.getAutoLockerDuration())) {
browser.storage.session.clear()
return
Expand Down

0 comments on commit 7c46f08

Please sign in to comment.