Skip to content

Commit

Permalink
Fixup: Use Object.assign when initializing with options
Browse files Browse the repository at this point in the history
  • Loading branch information
yvonnesjy authored and robyngit committed Sep 17, 2024
1 parent f083322 commit cb86e12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/js/views/maps/LayerDetailsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
},

Expand Down
4 changes: 1 addition & 3 deletions src/js/views/maps/LayerItemView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
},

Expand Down

0 comments on commit cb86e12

Please sign in to comment.