-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fix duplicate attributes issue #18
Fix duplicate attributes issue #18
Conversation
…ributes array that has all values duplicated
Hi @amwmedia, thanks a lot for the fix. Would you mind adding a test case? |
no problem. I've really enjoyed working with your library. If brings a lot of usefulness without trying to do too much. 👍 |
@@ -53,6 +53,11 @@ describe('JsonApiDataStore', () => { | |||
expect(article.title).to.eq('Cool article'); | |||
expect(article.author).to.eq('Lucas'); | |||
}); | |||
|
|||
it('should not duplicate the attributes if the record is processed again', () => { | |||
var article = store.sync(payload); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind explicitly sync
ing the payload twice here? There is no guarantee the tests will always be ran in the same order.
Sorry I took so long to review this. Please see my last comment. Apart from that, it looks ready to be merged! |
Would be neat if this was merged. Seems like it just needs a one line change or something. @amwmedia |
Sorry, I've been a bit busy with other stuff lately but plan to take care On Saturday, 23 April 2016, Dan Willoughby notifications@github.com wrote:
Lucas Hosseini |
@amozoss yeah, there's really not a lot to do on this, I just haven't had ANY time. We are approaching an MVP release at work... and all that entails. once we get past this release, I'll have some time to contribute more. I'll button this up then if it's not been taken care of by someone else at that point. |
Any news on this? |
Hey @amwmedia – any news on this one? |
this should be ready now, sorry for all the delays. We had a major MVP going out on a tight deadline so everything else took a backseat. |
@amwmedia Hope your MVP went well. I was just wondering if there is any chance of this patch being released via NPM? |
This is ready to be merged. @beauby can you accept the PR? :-) |
Merging – thanks for your work @amwmedia! |
That's awesome, thank you for merging. Any chance we can see this be released via NPM sometime soon? |
* fixed an issue where a record that is see twice, ends up with an _attributes array that has all values duplicated * added test case for attribute duplication issue
fixed an issue where a record that is see twice, ends up with an _attributes array that has all values duplicated