From 74b1ad761ade6ea15438402d4392a5e0ff036b2c Mon Sep 17 00:00:00 2001 From: huangjianbin Date: Mon, 23 Nov 2020 15:39:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=AE=89=E5=8D=93?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E6=8B=8D=E7=85=A7=E6=97=8B=E8=BD=AC=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lrz.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lrz.js b/src/lrz.js index bfe4a8e..c5c2eaa 100644 --- a/src/lrz.js +++ b/src/lrz.js @@ -8,7 +8,7 @@ var Promise = require('Promise'), var UA = (function (userAgent) { - var ISOldIOS = /OS (.*) like Mac OS X/g.exec(userAgent), + var ISOldIOS = /OS (\d+(?:_\d)?)(?:_\d)* like Mac OS X/g.exec(userAgent), isOldAndroid = /Android (\d.*?);/g.exec(userAgent) || /Android\/(\d.*?) /g.exec(userAgent); // 判断设备是否是IOS7以下 @@ -39,7 +39,7 @@ function Lrz (file, opts) { width : null, height : null, fieldName: 'file', - ingnoreOrientation: UA.iOS ? UA.newIOS : true, + ingnoreOrientation: UA.newIOS, quality : 0.7 };