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

Uncaught DOMException when removing an ROverlay #163

Closed
mmomtchev opened this issue Jun 30, 2023 · 1 comment
Closed

Uncaught DOMException when removing an ROverlay #163

mmomtchev opened this issue Jun 30, 2023 · 1 comment

Comments

@mmomtchev
Copy link
Owner

mmomtchev commented Jun 30, 2023

Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

I've been struggling with a variation of this. I've adjusted the above reproduction with this case (and RLayers 1.5.2): https://github.com/stefgootzen/rlayers-reproduction

I get the same error when only removing the ROverlay, like:

{
  features.map(f => <RFeature key={f.id} geometry={new Point(fromLonLat([f.longitude, f.latitude]))}>
    {/*
            Adding an ROverlay to a feature will cause a crash when the overlay is removed
        */}
    {
      (f.id === activeFeatureId) && (
        <ROverlay key={f.id}>
          <div>{f.id}</div>
        </ROverlay>
      )
    }
  </RFeature>)
}

(Relevant file here)

Any thoughts on how to fix this? Thanks in advance!

Originally posted by @stefgootzen in #1 (comment)

@mmomtchev
Copy link
Owner Author

Fixed by #164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant