Skip to content
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

Error on area.destroy #37

Closed
1 task done
ferm10n opened this issue Sep 27, 2024 · 2 comments
Closed
1 task done

Error on area.destroy #37

ferm10n opened this issue Sep 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ferm10n
Copy link

ferm10n commented Sep 27, 2024

Describe the bug

When using the reroute plugin, an error is thrown when calling area.destroy(): Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

The bug occurs when the reroute plugin attempts to remove the pins element, but by that point, the container element has already been emptied

Example to reproduce

https://codesandbox.io/p/sandbox/rete-js-v2-reroute-8doi0c?from-embed=

How to reproduce

Simply call area.destroy()

Expected behavior

Elements from the area should be removed without error.

Dependencies

See dependencies used in linked codesandbox

Platform

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ferm10n ferm10n added the bug Something isn't working label Sep 27, 2024
@ferm10n
Copy link
Author

ferm10n commented Sep 27, 2024

Does it make sense to have reroute-plugin try to call removeElement at all, if the area is just going to set innerHTML = ''?
Happy to submit a PR if needed, I just need a better understanding of the intended behavior.

@Ni55aN
Copy link
Member

Ni55aN commented Oct 12, 2024

Thanks for reporting!
Fixed in retejs/area-plugin#26

@Ni55aN Ni55aN closed this as completed Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants