Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Leon2xiaowu opened this issue Jun 26, 2021 · 0 comments
Open

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

Leon2xiaowu opened this issue Jun 26, 2021 · 0 comments

Comments

@Leon2xiaowu
Copy link

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}]}?

@Leon2xiaowu Leon2xiaowu changed the title The output of the exception when merging Object in Array The output of the exception when merging Array[<Object>] Jun 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant