Skip to content

Commit 030d9ae

Browse files
committed
Revert: Remove Safari=>macOS version mapping, since Safari versions not tied to macOS, unlike on iOS
1 parent 821c43a commit 030d9ae

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/main/ua-parser.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,9 +1298,7 @@
12981298
case OS:
12991299
// Since iOS 26, Safari's UA reports the OS version as frozen at 18:
13001300
// https://webkit.org/blog/17333/webkit-features-in-safari-26-0/#update-to-ua-string
1301-
if (this.get(NAME) == 'iOS' && this.get(VERSION) && /^1[89][^\d]/.exec(this.get(VERSION)) ||
1302-
// also on macOS 26, Safari reports the OS version as frozen at 10.15.7
1303-
this.get(NAME) == 'macOS' && this.get(VERSION) == '10.15.7') {
1301+
if (this.get(NAME) == 'iOS' && this.get(VERSION) && /^1[89][^\d]/.exec(this.get(VERSION))) {
13041302
// Based on the assumption that "iOS" version is tightly coupled with "Safari" version
13051303
var realVersion = /\) Version\/((\d+)[\d\.]*)/.exec(this.ua);
13061304
if (realVersion && parseInt(realVersion[2], 10) >= 26) {

test/data/ua/os/macos.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"expect" :
4242
{
4343
"name" : "macOS",
44-
"version" : "26.5"
44+
"version" : "10.15.7"
4545
}
4646
}
4747
]

0 commit comments

Comments
 (0)