Skip to content

Commit

Permalink
Better fix for checking if process exists. Built new bundles Fixes Gi…
Browse files Browse the repository at this point in the history
…thub #1582
  • Loading branch information
Sampo Kivistö committed Nov 16, 2021
1 parent 2ed75dc commit 5b95578
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/inferno/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { createRef, forwardRef, mountRef } from './core/refs';

if (process.env.NODE_ENV !== 'production') {
// Checks if Inferno is running in jest testing environment.
const testingEnv = (process && process.env && process.env.JEST_WORKER_ID !== undefined);
const testingEnv = (typeof(process) === 'object' && process.env && process.env.JEST_WORKER_ID !== undefined);

// This message informs developers that they are using development mode (can happen
// in production because of bundling mistakes) and, therefore, Inferno is slower
Expand Down

0 comments on commit 5b95578

Please sign in to comment.