Skip to content

Commit 28f2a0e

Browse files
authored
Merge pull request #71 from lucenera75/patch-1
fix: avoid errors in case of ssr
2 parents 33314bf + 2d74b48 commit 28f2a0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Cache.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const isLocalStorageAvailable: boolean = (() => {
2-
if (!window.localStorage) {
2+
if (typeof window === 'undefined' || !window.localStorage) {
33
return false
44
}
55
try {

0 commit comments

Comments
 (0)