Skip to content

Commit

Permalink
fix(browser): fixed running under webpack 5 when 'process' isn't defined
Browse files Browse the repository at this point in the history
  • Loading branch information
grantila committed Jan 11, 2023
1 parent c7f6a04 commit c35d4c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/index.ts
Expand Up @@ -909,7 +909,10 @@ export function defer< T = void >( ): Deferred< T >
} );

/* istanbul ignore next */
if ( process?.env?.JEST_WORKER_ID !== undefined )
if (
typeof process !== 'undefined' &&
process?.env?.JEST_WORKER_ID !== undefined
)
try
{
// Jest has decided for many versions to break async catching,
Expand Down

0 comments on commit c35d4c3

Please sign in to comment.