Skip to content

Commit

Permalink
don't permalink to custom profile
Browse files Browse the repository at this point in the history
  • Loading branch information
nrenner committed May 28, 2014
1 parent 376c546 commit 1527a07
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions js/plugin/Permalink.Routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,21 @@ L.Control.Permalink.include({
_update_routing: function (evt) {
var router = this.options.router,
routing = this.options.routing,
latLngs;
routingOptions = this.options.routingOptions,
latLngs = routing.getWaypoints(),
params = router.getUrlParams(latLngs);

if (evt && evt.options) {
router.setOptions(evt.options);
}

latLngs = routing.getWaypoints();
this._update(router.getUrlParams(latLngs));
// don't permalink to custom profile, as these are only stored temporarily
if (params.profile && params.profile === routingOptions.getCustomProfile()) {
params.profile = null;
}

this._update(params);
//console.log('permalink: ' + this._href.href);
},

_set_routing: function (e) {
Expand Down

0 comments on commit 1527a07

Please sign in to comment.