From 4472603a42859084f1a151ebc3676421d33547a7 Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Tue, 28 Feb 2017 11:09:13 +0300 Subject: [PATCH] CB-12105 (browser) Properly detect Edge --- src/browser/DeviceProxy.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/browser/DeviceProxy.js b/src/browser/DeviceProxy.js index a8632016..bc2e6014 100644 --- a/src/browser/DeviceProxy.js +++ b/src/browser/DeviceProxy.js @@ -37,7 +37,9 @@ function getBrowserInfo(getModel) { var returnVal = ''; var offset; - if ((offset = userAgent.indexOf('Chrome')) !== -1) { + if ((offset = userAgent.indexOf('Edge')) !== -1) { + returnVal = (getModel) ? 'Edge' : userAgent.substring(offset + 5); + } else if ((offset = userAgent.indexOf('Chrome')) !== -1) { returnVal = (getModel) ? 'Chrome' : userAgent.substring(offset + 7); } else if ((offset = userAgent.indexOf('Safari')) !== -1) { if (getModel) {