Skip to content

Commit

Permalink
Update checks
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Nov 7, 2016
1 parent 8457fdb commit b805b78
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/Core/FeatureDetection.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ define([
function isChrome() {
if (!defined(isChromeResult)) {
isChromeResult = false;
if (/Google Inc/.test(theNavigator.vendor)) {
// Edge contains Chrome in the user agent too
if (!isEdge()) {
var fields = (/ Chrome\/([\.0-9]+)/).exec(theNavigator.userAgent);
if (fields !== null) {
isChromeResult = true;
Expand All @@ -51,8 +52,8 @@ define([
if (!defined(isSafariResult)) {
isSafariResult = false;

// Chrome contains Safari in the user agent too
if (!isChrome() && (/ Safari\/[\.0-9]+/).test(theNavigator.userAgent)) {
// Chrome and Edge contain Safari in the user agent too
if (!isChrome() && !isEdge() && (/ Safari\/[\.0-9]+/).test(theNavigator.userAgent)) {
var fields = (/ Version\/([\.0-9]+)/).exec(theNavigator.userAgent);
if (fields !== null) {
isSafariResult = true;
Expand Down

0 comments on commit b805b78

Please sign in to comment.