Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Raruto committed Apr 23, 2023
2 parents dfc3ee4 + bfafa91 commit b2146e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ export const Elevation = L.Control.Elevation = L.Control.extend({
*/
initialize: function(opts) {

opts = L.setOptions(this, opts);
// opts = L.setOptions(this, opts);

// Fixes: https://github.com/Raruto/leaflet-elevation/pull/240
opts = L.setOptions(this, L.extend({}, structuredClone(Options), opts)); // "deep copy" nested objects (multiple charts)

this._data = [];
this._layers = L.featureGroup();
Expand Down

0 comments on commit b2146e6

Please sign in to comment.