We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
navigator
ReferenceError
1 parent fc809b6 commit f038793Copy full SHA for f038793
source/vendor/supports-color/browser.js
@@ -1,14 +1,18 @@
1
/* eslint-env browser */
2
3
const level = (() => {
4
- if (navigator.userAgentData) {
+ if (!('navigator' in globalThis)) {
5
+ return 0;
6
+ }
7
+
8
+ if (globalThis.navigator.userAgentData) {
9
const brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium');
10
if (brand && brand.version > 93) {
11
return 3;
12
}
13
14
- if (/\b(Chrome|Chromium)\//.test(navigator.userAgent)) {
15
+ if (/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)) {
16
return 1;
17
18
0 commit comments