Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Commit

Permalink
fix: handle environment with no navigator. Fixes #97
Browse files Browse the repository at this point in the history
  • Loading branch information
fritz-c committed Jan 14, 2018
1 parent d8c47fe commit 7f36b72
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
* @return {?number} ieVersion - IE version as an integer, or undefined if not IE
*/
export function getIEVersion() {
if (typeof window === 'undefined') {
if (
typeof window === 'undefined' ||
typeof window.navigator === 'undefined'
) {
return undefined;
}

Expand Down

0 comments on commit 7f36b72

Please sign in to comment.