Closed BnitoBzh closed 5 years ago
is there easy fix for this? If so make it happen. I am so far away from ember world ( spinning around the clojure universe now ) that I am just out of reach
please ask to @richardfrosztega to do the fix, I unfortunately have no time to do the necessary
I seem to be having problems with this function as well, but unrelated to the only
option, as I do not use it.
It seems that in my case, the isKnown function is called for a hasMany relationship. But inside the trackerKeys on the constructor, the hasMany relationship is not found.
This function returns undefined
in my case. Because the trackerKeys
do not contain my hasMany relationship
https://github.com/danielspaniel/ember-data-change-tracker/blob/a84506898c5e7c269bd8f774d94f961cc5a168cf/addon/tracker.js#L121-L127
I'd be willing to take a look, however, I don't understand the addon that well.
I managed to work around the issue for now with:
https://github.com/pjcarly/ember-data-change-tracker/commit/ede961a52d007c727dfbb4c4fb35fbb3493a3f98
¯\_(ツ)_/¯
Hi @pjcarly, @BnitoBzh,
I've followed up on the original change with the pull request above. It's difficult for me to prove this is what you need without some unit/acceptance tests from yourselves. But I've reasoned it though and think this might help.
Please feel free to see if this is what you need and talk to @danielspaniel about integration.
v0.9.3 has the fix from #72
https://github.com/danielspaniel/ember-data-change-tracker/blob/c73b707e0d653c86423c0ccc9a8d9b98947cd27b/addon/tracker.js#L345
In the
isKnown
function, theinfo
variable can be empty, due to theonly
option. If theonly
option does not contain the provided key,this.metaInfo(model, key)
returns undefined and naturally the function fails.