-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Maximum call stack size exceeded
error when accessing relationship
#502
Comments
👋 Thanks for the issue. I originally had a check to make sure it was not inherited. Looks like that property is not inherited so the fix below wouldn't have worked (as you indicated). adopted-ember-addons/validated-changeset@1240507 At first glance, I am a little lost. Pushed up a failing test for now... |
This seems like a less than ideal work-around but I wonder if we cache (WeakMap for the ObjectTreeNode instance) the "gotten" keys for |
@snewcomer I'm really not familiar with validated-changeset or ember-changeset internals, so I can't really talk about the validity of your workaround suggestion. :) |
closed with |
@snewcomer could it be possible that this error is still happening when the belongsTo relationship is |
@snewcomer I was able to reproduce this in a failing test this time: #504 |
Probably. We effectively need to something like this PR so we don't go down the deep deep hole of trying to iterate ember-data objects |
|
I can confirm that it is working now. Thanks a lot @snewcomer ! |
When I try to access a property of a belongs to relationship of a changeset object, I get a
Maximum call stack size exceeded
error. The error comes out wether you use thechangeset-get
helper or not.Example:
or
The changeset object was created using
Here's what the error looks like:
From what I was able to understand, I'm getting into an infinite loop around the
safeGet
here on the validated-changeset package: https://github.com/validated-changeset/validated-changeset/blob/e1dd9a65d19fd1e269b48049855421d32a041cfd/src/utils/object-tree-node.ts#L49The key that it loops in is
__CUSTOM_TAG_FOR__ember159149944767897589162650__
.I tried to PR a failing test, but it seemed like relationships are pretty will tested in ember-changeset, so I'm a bit lost now. :(
I'm using version 3.5.5, but this also happened with every other 3.X version.
Using ember and ember data 3.18.
The text was updated successfully, but these errors were encountered: