File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,19 @@ function injectStyle({
15
15
// eslint-disable-next-line @typescript-eslint/no-explicit-any
16
16
ref ?: any
17
17
} ) {
18
- if ( type === 'core' && process . env . REACT_TOOLTIP_DISABLE_CORE_STYLES ) {
18
+ if (
19
+ type === 'core' &&
20
+ typeof process !== 'undefined' && // this validation prevents docs from breaking even with `process?`
21
+ process ?. env ?. REACT_TOOLTIP_DISABLE_CORE_STYLES
22
+ ) {
19
23
return
20
24
}
21
25
22
- if ( type !== 'core' && process . env . REACT_TOOLTIP_DISABLE_BASE_STYLES ) {
26
+ if (
27
+ type !== 'core' &&
28
+ typeof process !== 'undefined' && // this validation prevents docs from breaking even with `process?`
29
+ process ?. env ?. REACT_TOOLTIP_DISABLE_BASE_STYLES
30
+ ) {
23
31
return
24
32
}
25
33
You can’t perform that action at this time.
0 commit comments