From eb60bafa86a3f6f74e88aa87ced6d4b99e68514a Mon Sep 17 00:00:00 2001 From: Ben Toews Date: Fri, 7 Oct 2016 07:45:51 -0600 Subject: [PATCH] Check `window.navigator.userAgent` in addition to `window.chrome` Apparently Edge defines `window.chrome`... --- u2f-api-polyfill.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/u2f-api-polyfill.js b/u2f-api-polyfill.js index ca599f5..d55065a 100644 --- a/u2f-api-polyfill.js +++ b/u2f-api-polyfill.js @@ -11,7 +11,8 @@ 'use strict'; (function (){ - if ('u2f' in window || !('chrome' in window)) { + var isChrome = 'chrome' in window && !window.navigator.userAgent.includes('Edge'); + if ('u2f' in window || !isChrome) { return; }