Skip to content

FeatureGroup.removeLayer tries to remove layers it doesn't contain #1847

@danzel

Description

@danzel

Not sure if this is really an issue, just seems a bit strange.
https://github.com/Leaflet/Leaflet/blob/master/src/layer/FeatureGroup.js#L29

If you call FeatureGroup.removeLayer with a layer that isn't in that featureGroup we still run all the code to remove it from the group and fire the layerremove event.

Not sure if this is anything anyone cares about. Thoughts @mourner @jfirebaugh ?

Firing layerremove seems a bit weird at least. Or would this be expected behavior?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions