diff --git a/src/js/views/maps/LayerDetailsView.js b/src/js/views/maps/LayerDetailsView.js index 017e39f66..41feec734 100644 --- a/src/js/views/maps/LayerDetailsView.js +++ b/src/js/views/maps/LayerDetailsView.js @@ -156,9 +156,7 @@ define([ initialize(options) { // Get all the options and apply them to this view if (typeof options === "object") { - Object.entries(options).forEach(([key, value]) => { - this[key] = value; - }); + Object.assign(this, options); } }, diff --git a/src/js/views/maps/LayerItemView.js b/src/js/views/maps/LayerItemView.js index 193c8f00e..9f3e30aee 100644 --- a/src/js/views/maps/LayerItemView.js +++ b/src/js/views/maps/LayerItemView.js @@ -113,9 +113,7 @@ define([ initialize(options) { // Get all the options and apply them to this view if (typeof options === "object") { - Object.entries(options).forEach(([key, value]) => { - this[key] = value; - }); + Object.assign(this, options); } },