Skip to content

Version 6 process is not defined #4564

@Janrupf

Description

@Janrupf

Prerequisites

What theme are you using?

other

Version

6

Current Behavior

process is referenced in potential browser code:

if (get(process, 'env.NODE_ENV') !== 'test') {

This leads to a javascript exception process is not defined

Expected Behavior

Properly detect whether process is defined or not. Just referencing it may throw an error in browser environments.

Steps To Reproduce

  1. Include an alpha build in your project
  2. Attempt to use rjsf Form's

Environment

- OS: ArchLinux
- Node: 23
- npm: 11.3.0

Anything else?

My suggestion would be to wrap this in a typeof(process) !== "undefined" check, in which case the variable not being defined doesn't lead to an exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions