You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @artf long time, I hope everything is going good with you and your closed ones.
There's a small case that I wanted to ask what you think before i make a request.
I have a custom link component that is wrapped around a li tag, this link has an event to remove its parent li when is removed.
If i delete the link directly everything works fine, but if I remove an outer parent that contains both li and link components, removeChildren in Components.js gets executed with an undefined component, causing this error to happen
This is due to the object being deleted during another callback (the custom one i made) before the removeChildren gets the parameter.
This can be solved by just returning if the removed param is falsey but maybe it's too hackish and i should look for another solution and not make the component delete its parent.
The text was updated successfully, but these errors were encountered:
jcamejo
changed the title
RemoveChildren in Components.js being executed with an undefined component parameter
RemoveChildren in Components.js being executed with an undefined component
Aug 6, 2020
Thanks Juan, all good and I hope the same to you :)
This can be solved by just returning if the removed param is falsey but maybe it's too hackish and i should look for another solution and not make the component delete its parent.
Well, technically removeChildren shouldn't be called "without" removed, so if that condition solves your issue I think it's good.
I also think that your case might be used by someone else
Hi @artf long time, I hope everything is going good with you and your closed ones.
There's a small case that I wanted to ask what you think before i make a request.
I have a custom link component that is wrapped around a li tag, this link has an event to remove its parent li when is removed.
If i delete the link directly everything works fine, but if I remove an outer parent that contains both li and link components, removeChildren in Components.js gets executed with an undefined component, causing this error to happen
This is due to the object being deleted during another callback (the custom one i made) before the removeChildren gets the parameter.
This can be solved by just returning if the removed param is falsey but maybe it's too hackish and i should look for another solution and not make the component delete its parent.
What do you think?
Thanks!
The text was updated successfully, but these errors were encountered: