Skip to content
This repository was archived by the owner on May 14, 2020. It is now read-only.
This repository was archived by the owner on May 14, 2020. It is now read-only.

Objects without prototype chain are broken #20

@martinhoefling

Description

@martinhoefling

When objects are created via Object.create(null) they cannot be expanded and the object properties are not shown due to Uncaught TypeError: obj.hasOwnProperty is not a function.
The problematic part is in https://github.com/chibicode/react-json-tree/blob/master/src/JSONObjectNode.js#L32 where it is assumed that hasOwnProperty is always present.

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