Skip to content

Uncaught DOMException when removing an ROverlay #163

Closed
@mmomtchev

Description

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions