mirror of
https://github.com/go-gitea/u2f-api.git
synced 2026-07-01 20:24:01 -04:00
Fixed running in Node.js
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ module.exports = API;
|
||||
var chromeApi = require( './google-u2f-api' );
|
||||
|
||||
// Feature detection (yes really)
|
||||
var isBrowser = navigator && !!navigator.userAgent;
|
||||
var isBrowser = ( typeof navigator !== 'undefined' ) && !!navigator.userAgent;
|
||||
var isSafari = isBrowser && navigator.userAgent.match( /Safari\// )
|
||||
&& !navigator.userAgent.match( /Chrome\// );
|
||||
var isEDGE = isBrowser && navigator.userAgent.match( /Edge\/1[2345]/ );
|
||||
|
||||
Reference in New Issue
Block a user