iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.07k stars 290 forks source link

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

Closed mgermerie closed 6 months ago

mgermerie commented 6 months ago

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.