Closed green-arrow closed 9 years ago
Yes, this has changed in Ember Data beta17. When no relationship data is available, it returns undefined
now instead of an empty array. I had to update this as well to get it working in beta 18.
This is fixed in #84
It seems this issue was solved by @Asgaroth in his pull request. The specific LOC can be found here. @green-arrow I'm closing this issue and the associated pull request. If I missed anything let me know.
@jonkoops Is it possible to get a new release of this cut?I believe this will prevent people from being able to update ember-data.
@kurko Could you tag a new release? I am not familiar with the process. Or can I just add a git tag?
@green-arrow @jonkoops so, I pushed 0.5.0
tag to Github.
As for the NPM release, it's really odd. I had released this weak. I guess I either forgot to do the final <enter>
to execute the command or there some cache in the interwebz. Anyway, it's there! https://www.npmjs.com/package/ember-json-api
Nice. Thanks @kurko
In the
findHasMany
function, the relationship is being queried in the first line:However, it looks like now the result of
snapshot.hasMany(relationship.key)
is coming back as undefined instead of an empty array, which I believe was the original result when I first wrote that line.Changing to something like the following should resolve the issue: