Skip to content

deepDiffer code triggers "Your code is broken" warnings about for...in Array iteration #870

@ccheever

Description

@ccheever

This code in Libraries/Utilities/differ/deepDiffer.js triggers the warning mentioned in #869

        for (var key in one) {
            if (deepDiffer(one[key], two[key])) {
                return true;
            }
        }
        for (var twoKey in two) {
            // The only case we haven't checked yet is keys that are in two but aren't
            // in one, which means they are different.
            if (one[twoKey] === undefined && two[twoKey] !== undefined) {
                return true;
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions