Skip to content

Commit

Permalink
Handle envs with window defined but no window.navigator
Browse files Browse the repository at this point in the history
This can happen in some node envs, e.g. #142
  • Loading branch information
pimterry committed Feb 10, 2020
1 parent 1ee5d69 commit 22e5f9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/loglevel.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// Slightly dubious tricks to cut down minimized file size
var noop = function() {};
var undefinedType = "undefined";
var isIE = (typeof window !== undefinedType) && (
var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (
/Trident\/|MSIE /.test(window.navigator.userAgent)
);

Expand Down

0 comments on commit 22e5f9c

Please sign in to comment.