Skip to content

global becomes undefined #13027

Closed
Closed
@macsmac

Description

@macsmac

When I run this code:

Object.keys(global).forEach(k => Object.defineProperty(global, k, {set:console.log}));

global object becomes undefined

typeof global // "undefined"

But

typeof this // "object"

And if I will run Object.keys or Object.defineProperty global does not become undefined. Bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssues that look for answers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions