Skip to content

[BUG] isJsDom should not be true when node v21.1.0 #29

@loynoir

Description

@loynoir

const isJsDom =
(typeof window !== "undefined" && window.name === "nodejs") ||
(typeof navigator !== "undefined" &&
(navigator.userAgent.includes("Node.js") ||
navigator.userAgent.includes("jsdom")));

$ node
Welcome to Node.js v21.1.0.
Type ".help" for more information.
> 
> isJsDom = 
...    (typeof window !== "undefined" && window.name === "nodejs") || 
...    (typeof navigator !== "undefined" && 
...      (navigator.userAgent.includes("Node.js") || 
...        navigator.userAgent.includes("jsdom"))); 
true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions