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({
1515 // eslint-disable-next-line @typescript-eslint/no-explicit-any
1616 ref ?: any
1717} ) {
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+ ) {
1923 return
2024 }
2125
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+ ) {
2331 return
2432 }
2533
You can’t perform that action at this time.
0 commit comments