Skip to content

Commit 27882ee

Browse files
committed
🐛 Fix undefined window on SSR
1 parent 3d17bba commit 27882ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/Cacher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default class Cacher {
3030
* @memberOf Cacher
3131
*/
3232
static supportSession(): boolean {
33-
return window.sessionStorage ? true : false;
33+
return (typeof window !== 'undefined') && window.sessionStorage ? true : false;
3434
}
3535

3636
/**

0 commit comments

Comments
 (0)