Skip to content

The output of the exception when merging Array[<Object>] #47

@Leon2xiaowu

Description

@Leon2xiaowu

when I ran the following code, I was surprised by the result

const target = {}
deepExtend(
  target,
  {
    series: [{ center: [1, 2], other: 1, dif: 2 }]
  },
  { series: [{ center: [3, 4] }] }
)
console.log(target, 'reuslt')

this outputs {"series":[{"center":[3,4]}]}.

Shouldn't the correct result be {"series":[{"center":[3,4],"other": 1,"dif": 2}]}?

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