Skip to content

Commit c7edd5d

Browse files
committed
not use default data for track
1 parent 69ad0fd commit c7edd5d

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "leaflet-react-track-player",
33
"description": "This is plugin to react-leaflet. It create player for control of track.",
4-
"version": "1.1.1",
4+
"version": "1.1.2",
55
"private": false,
66
"main": "lib/index.js",
77
"homepage": "https://github.com/argonavt11/leaflet-react-track-player",

src/laeflet-react-track-player/index.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,10 @@ class LeafletReactTrackPlayer extends MapLayer {
7272
iconSize: [35, 35]
7373
});
7474
const course = this.props.customMarker && this.props.customCourse && this.state.track[0] && this.state.track[0].course ? this.state.track[0].course : null;
75-
if (this.state.track[0]) {
76-
const finishMarker = L.marker(this.props.track[0], {
77-
icon: this.createIcon(course)
78-
});
79-
this.props.leaflet.map.addLayer(finishMarker);
80-
}
81-
75+
const finishMarker = L.marker(this.props.track[0], {
76+
icon: this.createIcon(course)
77+
});
78+
this.props.leaflet.map.addLayer(finishMarker);
8279
// polyline
8380
const snakePolyline = L.multiOptionsPolyline(this.props.track, {
8481
...paramsForMultiPolyline(this.props),
@@ -504,7 +501,6 @@ class LeafletReactTrackPlayer extends MapLayer {
504501
}
505502

506503
LeafletReactTrackPlayer.defaultProps = {
507-
track: [],
508504
useControl: true,
509505
useInformationPanel: false,
510506
optionMultyIdxFn: function() {},

0 commit comments

Comments
 (0)