Skip to content

Commit

Permalink
fix(plan): fire events and update markers with complete waypoints array
Browse files Browse the repository at this point in the history
Close #153.
  • Loading branch information
perliedman committed Sep 2, 2015
1 parent 9d86204 commit 45aabc9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/L.Routing.Plan.js
Expand Up @@ -77,13 +77,13 @@

[].splice.apply(this._waypoints, args);

this._updateMarkers();
this._fireChanged.apply(this, args);

// Make sure there's always at least two waypoints
while (this._waypoints.length < 2) {
this.spliceWaypoints(this._waypoints.length, 0, null);
}

this._updateMarkers();
this._fireChanged.apply(this, args);
},

onAdd: function(map) {
Expand Down

0 comments on commit 45aabc9

Please sign in to comment.