Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Commit

Permalink
Don't require document object (for Node client).
Browse files Browse the repository at this point in the history
  • Loading branch information
hperrin committed Jul 19, 2018
1 parent 4ff54f3 commit c593cba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Entities/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ export class User extends Entity {
}

static handleToken () {
if (typeof document === 'undefined') {
return;
}
const token = document.cookie.replace(/(?:(?:^|.*;\s*)TILMELDAUTH\s*=\s*([^;]*).*$)|^.*$/, '$1');
if (currentToken !== token) {
if (token === '') {
Expand Down

0 comments on commit c593cba

Please sign in to comment.