Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
MV88 committed Mar 10, 2017
1 parent eb115ee commit bdc1c8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/client/components/map/leaflet/MeasurementSupport.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const MeasurementSupport = React.createClass({
this.lastLayer = evt.layer;

if (this.props.measurement.geomType === 'Point') {
let pos = this.drawControl._marker.getLatLng();
let pos = this.drawControl._markers.getLatLng();
let point = {x: pos.lng, y: pos.lat, srs: 'EPSG:4326'};
let newMeasureState = assign({}, this.props.measurement, {point: point});
this.props.changeMeasurementState(newMeasureState);
Expand Down Expand Up @@ -119,7 +119,7 @@ const MeasurementSupport = React.createClass({
this.drawControl.enable();
this.drawing = true;
} else {
let bearingMarkers = this.drawControl._markers;
let bearingMarkers = this.drawControl._markers || [];

if (bearingMarkers.length <= 2 ) {
this.updateMeasurementResults();
Expand Down

0 comments on commit bdc1c8c

Please sign in to comment.