From 46c56a49d758a9fa97b416eda3597213a5a4ac36 Mon Sep 17 00:00:00 2001 From: Bedis ElAcheche Date: Wed, 27 Mar 2019 10:57:01 +0100 Subject: [PATCH] Improve safari user-agent detection --- is.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/is.js b/is.js index bf63d0e..274451a 100644 --- a/is.js +++ b/is.js @@ -765,7 +765,7 @@ // is current browser safari? // parameter is optional is.safari = function(range) { - var match = userAgent.match(/version\/(\d+).+?safari/); + var match = userAgent.match(/version\/(\d+)((?!chrome).)+?safari/); return match !== null && compareVersion(match[1], range); }; // safari method does not support 'all' and 'any' interfaces diff --git a/package.json b/package.json index 380f8d7..49942b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "is_js", - "version": "0.9.0", + "version": "0.9.1", "main": "is.js", "license": "MIT", "description": "micro check library",