Skip to content

Commit

Permalink
fix: avoid state undefined expection
Browse files Browse the repository at this point in the history
  • Loading branch information
charleslavon committed Oct 6, 2023
1 parent f0a1a98 commit b574eb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const showNotificationModal = () => {
return false;
}

const state = getNotificationLocalStorage();
const state = getNotificationLocalStorage() || {};

if ((isLocalStorageSupported() && !state.showOnTS) || state.showOnTS < Date.now()) {
return true;
Expand Down

0 comments on commit b574eb7

Please sign in to comment.