Skip to content

Commit

Permalink
fix: CozyClient can be used in a node env
Browse files Browse the repository at this point in the history
Previous fix tried to handle undefined `window` in node env

But in a node env window is not `undefined` as it is not even an
existing variable

So instead of checking its value, a better way is to check its type as
`typeof` will return `'undefined'` when called with a variable that
does not exist

Related commit: 509a0ca
  • Loading branch information
Ldoppea committed May 25, 2022
1 parent 0144062 commit 2b963c6
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 88 deletions.

0 comments on commit 2b963c6

Please sign in to comment.