cleanup: Don't shadow variables
Having variables that share the same name in overlapping scopes is confusing and error-prone, and is best avoided. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
2e4e2500dd
commit
682bd7e97c
@ -423,10 +423,10 @@ class ObjInspector extends St.ScrollView {
|
||||
} catch (e) {
|
||||
link = new St.Label({ text: '<error>' });
|
||||
}
|
||||
let hbox = new St.BoxLayout();
|
||||
hbox.add(new St.Label({ text: `${propName}: ` }));
|
||||
hbox.add(link);
|
||||
this._container.add_actor(hbox);
|
||||
let box = new St.BoxLayout();
|
||||
box.add(new St.Label({ text: `${propName}: ` }));
|
||||
box.add(link);
|
||||
this._container.add_actor(box);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user