summaryrefslogtreecommitdiff
path: root/src/osmTypeListRow.js
diff options
context:
space:
mode:
authorJames Westman <james@jwestman.net>2022-10-04 16:09:06 -0500
committerJames Westman <james@jwestman.net>2022-10-05 21:30:19 -0500
commit03acf6f3b8c5c08f67c5989c746a8c9b4a3923f6 (patch)
treed14320e239460b6e9cbbfc5b7f42bb95f140e4cf /src/osmTypeListRow.js
parent0282bc30f2b78d5e4c3a19f970740886fbc5ed15 (diff)
downloadgnome-maps-03acf6f3b8c5c08f67c5989c746a8c9b4a3923f6.tar.gz
Use object destructuring in constructors
Diffstat (limited to 'src/osmTypeListRow.js')
-rw-r--r--src/osmTypeListRow.js7
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;