Skip to content

Promise constructor being polyfilled incorrectly in nodejs environment with jsdom #1110

@mwijngaard

Description

@mwijngaard

Commit c08f5e6 inverted an if statement in the promise constructor detection, causing it to now return true for nodejs environments with jsdom loaded, e.g. with Jest (due to: V8_VERSION >=51, native promise, window object present and thus IS_BROWSER=true). I'm not exactly sure why the if statement was inverted, but it doesn't seem like it was the intention to leave the last line out. Now it actually means something different.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions