Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Ignore Safari backported releases #1572

Merged
merged 3 commits into from
Oct 16, 2021
Merged

Ignore Safari backported releases #1572

merged 3 commits into from
Oct 16, 2021

Conversation

queengooborg
Copy link
Collaborator

This PR updates the UA parser to ignore known backported releases of Safari, rather than remapping them to the versions they backport (due to OS integration differences causing some features to report as false) or worse, to their prior versions. This is practically the opposite of #1244.

ua-parser.js Outdated Show resolved Hide resolved
ua-parser.js Outdated
@@ -74,6 +74,15 @@ const parseUA = (userAgent, browsers) => {
const versions = Object.keys(browsers[data.browser.id].releases);
versions.sort(compareVersions);

// Certain Safari versions are backports of newer versions, but contain less
// features, particularly ones involving OS integration. We will ignore these
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not ignored, something is returned. I guess inBcd being false is the important thing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct -- this allows us to tell the client what browser we've detected and potentially still use the data if we wanted to!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the comment to reflect this?

@foolip foolip merged commit 7dc6971 into main Oct 16, 2021
@foolip foolip deleted the ignore-safari-backports branch October 16, 2021 21:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants