From efce17881f3733a17275ebfd7ccf6aafef9b1448 Mon Sep 17 00:00:00 2001 From: Denis Demchenko Date: Fri, 9 Jun 2017 23:49:08 +0300 Subject: [PATCH] Fix iPhone and iPod detection --- src/parser-platforms.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/parser-platforms.js b/src/parser-platforms.js index 3e19ca7..7dbfff4 100644 --- a/src/parser-platforms.js +++ b/src/parser-platforms.js @@ -72,7 +72,11 @@ export default [ /* iPod/iPhone */ { - test: [/ipod|iphone/i], + test(parser) { + const iDevice = parser.test(/ipod|iphone/i); + const likeIDevice = parser.test(/like (ipod|iphone)/i); + return iDevice && !likeIDevice; + }, describe(ua) { const model = getFirstMatch(/(ipod|iphone)/i, ua); return {