8000 `utils.deepEqual` return true with two different Arrays · Issue #471 · js-data/js-data · GitHub
[go: up one dir, main page]

Skip to content
utils.deepEqual return true with two different Arrays #471
Closed
@putrefaction

Description

@putrefaction

https://github.com/js-data/js-data/blob/master/src/utils.js#L1507

If two arrays are compared, when the second array starts with the same datas than the first one, the function always returns true.

utils.deepEqual( ["a", "b"] , ["a", "b", "c", "d", "e"] ) returns true

a.forEach(function (value, i) {
    _equal = _equal && utils.deepEqual(value, b[i])
    if (!_equal) {
      return false
    }
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0