[gnome-shell] lookingGlass: Fix misleading typeof use
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] lookingGlass: Fix misleading typeof use
- Date: Wed, 11 Sep 2019 21:13:26 +0000 (UTC)
commit 691610f23c27b0e580dae7fb8a0a536452b5ba28
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Aug 19 20:11:12 2019 +0200
lookingGlass: Fix misleading typeof use
typeof is an operator, not a function. Putting unneeded parentheses
around the expression obfuscates that.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
js/ui/lookingGlass.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js
index 2c1239cd5f..1143dedb52 100644
--- a/js/ui/lookingGlass.js
+++ b/js/ui/lookingGlass.js
@@ -240,7 +240,7 @@ var Notebook = class Notebook {
Signals.addSignalMethods(Notebook.prototype);
function objectToString(o) {
- if (typeof(o) == typeof(objectToString)) {
+ if (typeof o == typeof objectToString) {
// special case this since the default is way, way too verbose
return '<js function>';
} else {
@@ -369,7 +369,7 @@ var ObjInspector = class ObjInspector {
let hbox = new St.BoxLayout({ style_class: 'lg-obj-inspector-title' });
this._container.add_actor(hbox);
- let label = new St.Label({ text: 'Inspecting: %s: %s'.format(typeof(obj),
+ let label = new St.Label({ text: 'Inspecting: %s: %s'.format(typeof obj,
objectToString(obj)) });
label.single_line_mode = true;
hbox.add(label, { expand: true, y_fill: false });
@@ -387,7 +387,7 @@ var ObjInspector = class ObjInspector {
button.add_actor(new St.Icon({ icon_name: 'window-close-symbolic' }));
button.connect('clicked', this.close.bind(this));
hbox.add(button);
- if (typeof(obj) == typeof({})) {
+ if (typeof obj == typeof {}) {
let properties = [];
for (let propName in obj) {
properties.push(propName);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]