Skip to content

Commit

Permalink
fix(marker): properly remove onClick event listener on unmount
Browse files Browse the repository at this point in the history
Stepan Kuzmin committed Aug 3, 2020
1 parent 2c18756 commit abc28ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Marker/index.js
Original file line number Diff line number Diff line change
@@ -160,7 +160,7 @@ class Marker extends PureComponent<Props> {
}

if (this.props.onClick) {
this._el.addEventListener('click', this.props.onClick);
this._el.removeEventListener('click', this.props.onClick);
}

this._marker.remove();

0 comments on commit abc28ee

Please sign in to comment.