镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

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

Closed

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;
            }
        }

Activity

  1. sophiebits commented on Apr 16, 2015

    @sophiebits
    Contributor

    Dupe of #868, it looks like.

  2. locked as resolved and limited conversation to collaborators on May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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