diff options
author | James Westman <james@jwestman.net> | 2022-10-04 16:09:06 -0500 |
---|---|---|
committer | James Westman <james@jwestman.net> | 2022-10-05 21:30:19 -0500 |
commit | 03acf6f3b8c5c08f67c5989c746a8c9b4a3923f6 (patch) | |
tree | d14320e239460b6e9cbbfc5b7f42bb95f140e4cf /src/osmTypeListRow.js | |
parent | 0282bc30f2b78d5e4c3a19f970740886fbc5ed15 (diff) | |
download | gnome-maps-03acf6f3b8c5c08f67c5989c746a8c9b4a3923f6.tar.gz |
Use object destructuring in constructors
Diffstat (limited to 'src/osmTypeListRow.js')
-rw-r--r-- | src/osmTypeListRow.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/osmTypeListRow.js b/src/osmTypeListRow.js index 81940e0e..524b511f 100644 --- a/src/osmTypeListRow.js +++ b/src/osmTypeListRow.js @@ -24,11 +24,8 @@ import Gtk from 'gi://Gtk'; export class OSMTypeListRow extends Gtk.ListBoxRow { - constructor(props) { - let type = props.type; - delete props.type; - - super(props); + constructor({type, ...params}) { + super(params); this._type = type; this._name.label = this._type.title; |