Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests): prevent overwriting navigator.userAgent #2255

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

mgermerie
Copy link
Contributor

@mgermerie mgermerie commented Jan 9, 2024

Before contributing

Description

As discussed in #2254, the navigator.userAgent has been made read-only in node 21.1.0 (see this commit).

In this PR, we check if navigator is already set (allegedly by node). If that's the case, we don't overwrite it.

Copy link
Contributor

@Desplandis Desplandis left a comment

Choose a reason for hiding this comment

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

Tested on node 21.0.0 and latest LTS (20.11.0), works like a charm!
Could you please add a notice (see comment)?

test/unit/bootstrap.js Show resolved Hide resolved
This property has been made read-only in node 21.1.0
@Desplandis Desplandis merged commit f146262 into iTowns:master Jan 12, 2024
9 checks passed
@mgermerie mgermerie deleted the fix/test-node21 branch January 12, 2024 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants