Skip to content

Commit 7f18f15

Browse files
committed
fix node test
1 parent c55317a commit 7f18f15

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/authentication.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ export const setCookieAuthentication = (store: Store, agent: Agent) => {
103103
};
104104

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

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

0 commit comments

Comments
 (0)