Skip to content

Commit

Permalink
Merge pull request #550 from vadzim/RemoveDuplicateElementCreation
Browse files Browse the repository at this point in the history
(#549) Remove duplicate element creation
  • Loading branch information
PaulLeCam committed Jan 12, 2019
2 parents de369a5 + 6a930e7 commit 50eaee0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions src/MapLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default class MapLayer<
Props: MapLayerProps,
> extends MapComponent<LeafletElement, Props> {
contextValue: ?LeafletContext
leafletElement: LeafletElement

constructor(props: Props) {
super(props)
Expand Down
3 changes: 0 additions & 3 deletions src/Path.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@ export default class Path<
LeafletElement: PathType,
Props: PathProps,
> extends MapLayer<LeafletElement, Props> {
leafletElement: LeafletElement

constructor(props: Props) {
super(props)
this.leafletElement = this.createLeafletElement(props)
if (this.contextValue == null) {
this.contextValue = {
...props.leaflet,
Expand Down

0 comments on commit 50eaee0

Please sign in to comment.