Skip to content

Commit d78cf0c

Browse files
committed
fix node test
1 parent d9eb9ea commit d78cf0c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/authentication.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ export const setCookieAuthentication = (store: Store, agent: Agent) => {
102102
};
103103

104104
export const removeCookieAuthentication = () => {
105-
document.cookie = `${COOKIE_NAME_AUTH}=;Max-Age=-99999999`;
105+
if (typeof document !== 'undefined') {
106+
document.cookie = `${COOKIE_NAME_AUTH}=;Max-Age=-99999999`;
107+
}
106108
};
107109

108110
/** Returns false if the auth cookie is not set / expired */

0 commit comments

Comments
 (0)