Skip to content

Commit

Permalink
fix(tauri/ui): explict undefined check
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyg committed Feb 8, 2024
1 parent bef4e5f commit 5e964ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tauri-app/src/lib/storesGeneric/cachedWritableStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function cachedWritableStore<T>(
return cached ? deserialize(cached) : defaultValue;
}
const setCache = (value?: T) => {
if(value) {
if(value !== undefined) {
localStorage.setItem(key, serialize(value));
} else {
localStorage.removeItem(key);
Expand Down

0 comments on commit 5e964ce

Please sign in to comment.