Skip to content

[BUG] diffDeep lacks the undefined argument checks of equalsDeep() #812

@jdmarshall

Description

@jdmarshall

Describe the bug

in equalsDeep:

    // Fast comparisons
    if (!object1 || !object2) {
      return false;
    }

No such check in diffDeep, so we get to:

    for (const parm in object2) { //TODO: strings are iterable and this is a bug
      const value1 = object1[parm];
      const value2 = object2[parm];

and the second line blows up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions