Skip to content

Error when updating state from null to an object. #9

@Kanaye

Description

@Kanaye

When updating a states property from a primitiv value (e.g. null) null to an object.
The following line tries to access an property on the primitiv value and therefore throws an error.

update[i] = diffOne(obj[i], prev[i]);

Here an example.

I probably also PR for this one later.

Edit: It's only null because typeof null === 'object'.

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