Skip to content

Commit 6066827

Browse files
committed
Only call navigator.javaEnabled on instances of Navigator (fixes snowplow#491)
1 parent 726abc3 commit 6066827

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/js/lib/detectors.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@
221221

222222
// Safari and Opera
223223
// IE6/IE7 navigator.javaEnabled can't be aliased, so test directly
224-
if (typeof navigatorAlias.javaEnabled !== 'unknown' &&
224+
if (navigatorAlias.constructor === window.Navigator &&
225+
typeof navigatorAlias.javaEnabled !== 'unknown' &&
225226
!lodash.isUndefined(navigatorAlias.javaEnabled) &&
226227
navigatorAlias.javaEnabled()) {
227228
features.java = '1';

0 commit comments

Comments
 (0)