Skip to content

Commit

Permalink
use store.hasOwnProperty instead of store[key] in db.get to also get …
Browse files Browse the repository at this point in the history
…falsy values
  • Loading branch information
jaeh committed Mar 4, 2021
1 parent 384f1c7 commit 2c38956
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const get = (dispatch, { action, key }) => {

let value = undefined

if (key && store[key]) {
if (key && store.hasOwnProperty(key)) {
value = lib.json.parse(store[key])

if (typeof value === 'Error') {
Expand Down

0 comments on commit 2c38956

Please sign in to comment.