File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2487,7 +2487,7 @@ function detectBrowser(window) {
24872487 } ;
24882488
24892489 // Fail early if it's not a browser
2490- if ( typeof window === 'undefined' || ! window . navigator ) {
2490+ if ( typeof window === 'undefined' || ! window . navigator || ! window . navigator . userAgent ) {
24912491 result . browser = 'Not a browser.' ;
24922492 return result ;
24932493 }
Original file line number Diff line number Diff line change @@ -2487,7 +2487,7 @@ function detectBrowser(window) {
24872487 } ;
24882488
24892489 // Fail early if it's not a browser
2490- if ( typeof window === 'undefined' || ! window . navigator ) {
2490+ if ( typeof window === 'undefined' || ! window . navigator || ! window . navigator . userAgent ) {
24912491 result . browser = 'Not a browser.' ;
24922492 return result ;
24932493 }
You can’t perform that action at this time.
0 commit comments