Commit 54d6f8d3 authored by Robert Knight's avatar Robert Knight Committed by Nick Stenning

Fix Chrome extension installation being offered under Edge

Microsoft Edge unfortunately has to spoof various aspects
of the Chrome environment, including having the string
"Chrome" in its UA string and it also exposes a 'window.chrome' object
in the DOM.

Make the check for the Chrome extension stricter by checking
for 'chrome.webstore' instead.
parent 82302d92
......@@ -4,5 +4,6 @@ module.exports = {
// we test for the existence of window.chrome here because Microsoft Edge
// (and possibly others) serve
isChrome: typeof window.chrome !== 'undefined',
isChrome: typeof window.chrome !== 'undefined' &&
typeof window.chrome.webstore !== 'undefined',
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment