Skip to content

Commit a5eaf38

Browse files
fix: check process is defined (#5449)
1 parent bc580c5 commit a5eaf38

File tree

1 file changed

+1
-1
lines changed
  • packages/@lwc/ssr-client-utils/src

1 file changed

+1
-1
lines changed

packages/@lwc/ssr-client-utils/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ export function registerLwcStyleComponent() {
6262
}
6363

6464
// Only used in LWC's Karma tests
65-
if (process.env.NODE_ENV === 'test-karma-lwc') {
65+
if (typeof process !== 'undefined' && process?.env?.NODE_ENV === 'test-karma-lwc') {
6666
(window as any).__lwcClearStylesheetCache = () => stylesheetCache.clear();
6767
}

0 commit comments

Comments
 (0)