Skip to content

Commit

Permalink
fix: Local storage can be null
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed Jan 12, 2021
1 parent 1c0b931 commit b1ffe5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const sessionStart = () => {
w: window.innerWidth,
h: window.innerHeight
},
lvd: window.localStorage.getItem('chiffre:last-visit-date') || undefined,
lvd: window.localStorage?.getItem('chiffre:last-visit-date') || undefined,
sid: sessionID,
path: window.location.pathname
})
Expand Down

0 comments on commit b1ffe5d

Please sign in to comment.