Skip to content

Commit

Permalink
fix: retrieving store values causes update (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrani committed May 26, 2024
1 parent ce3a191 commit 9ddb88d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stores/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export default class CacheStore {

getValue({ key, value }) {
const result = this.getKey(key)
if (typeof result == 'string' || (result && this.isEmpty(value))) return result
if (['object', 'string'].includes(typeof result) || (result && this.isEmpty(value)))
return result

return this.update({ key, value })
}
Expand Down

0 comments on commit 9ddb88d

Please sign in to comment.