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

Arrays returned as objects #94

Open
StephenTHendrix opened this issue Mar 28, 2023 · 3 comments
Open

Arrays returned as objects #94

StephenTHendrix opened this issue Mar 28, 2023 · 3 comments

Comments

@StephenTHendrix
Copy link

I think I'm just re-reporting #79.

diff({ test: [] }, { test: ['apple'] })
returns
{ test: { 0: 'apple' }

@obrunopolo
Copy link

Same for me

@mikila85
Copy link

same for me, is there a fix anyone found or should i find a different package?
actually should even be ability to say ignoreArrays:true to just get the new array instead of each index which doesnt really matter to alot of people..

@baermathias
Copy link

It seems that this here doesn't work at all:

  diff(
    {
      v: {
        data: [
          {
            blabla: 3,
          },
        ],
      },
    },
    {
      v: {
        data: [
          {},
        ],
      },
    },
  ),

Returns:

[Object: null prototype] {
  v: [Object: null prototype] {
    data: [Object: null prototype] { '0': [Object: null prototype] }
  }
}

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

4 participants