Repository: cordova-plugin-device Updated Branches: refs/heads/master 48e0e7f32 -> 4472603a4
CB-12105 (browser) Properly detect Edge Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/4472603a Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/4472603a Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/4472603a Branch: refs/heads/master Commit: 4472603a42859084f1a151ebc3676421d33547a7 Parents: 48e0e7f Author: Alexander Sorokin <[email protected]> Authored: Tue Feb 28 11:09:13 2017 +0300 Committer: Alexander Sorokin <[email protected]> Committed: Tue Feb 28 11:09:13 2017 +0300 ---------------------------------------------------------------------- src/browser/DeviceProxy.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/4472603a/src/browser/DeviceProxy.js ---------------------------------------------------------------------- diff --git a/src/browser/DeviceProxy.js b/src/browser/DeviceProxy.js index a863201..bc2e601 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) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
