diff --git a/src/devtools/index.ts b/src/devtools/index.ts index 62e548c10..6d67e6f8f 100644 --- a/src/devtools/index.ts +++ b/src/devtools/index.ts @@ -99,7 +99,10 @@ export function setupDevtools( doc: Document, ): void { // NOTE(hackerwins): For production builds, or when running in Node.js, do nothing. - if (process.env.NODE_ENV === 'production' || typeof window === 'undefined') { + if ( + (typeof process !== 'undefined' && process.env.NODE_ENV === 'production') || + typeof window === 'undefined' + ) { return; }