diff --git a/extensions/auto-move-windows/extension.js b/extensions/auto-move-windows/extension.js index 9ffdfea9..de9f3b51 100644 --- a/extensions/auto-move-windows/extension.js +++ b/extensions/auto-move-windows/extension.js @@ -44,7 +44,7 @@ class WindowMover { }); let addedApps = ids.map(id => this._appSystem.lookup_app(id)).filter( - app => app != null && !this._appData.has(app) + app => app && !this._appData.has(app) ); addedApps.forEach(app => { let data = { diff --git a/extensions/drive-menu/extension.js b/extensions/drive-menu/extension.js index 0463fb5b..365e2449 100644 --- a/extensions/drive-menu/extension.js +++ b/extensions/drive-menu/extension.js @@ -53,7 +53,7 @@ class MountMenuItem extends PopupMenu.PopupBaseMenuItem { let volume = this.mount.get_volume(); - if (volume == null) { + if (!volume) { // probably a GDaemonMount, could be network or // local, but we can't tell; assume it's local for now return true; diff --git a/extensions/places-menu/placeDisplay.js b/extensions/places-menu/placeDisplay.js index 7b8b7194..1612a835 100644 --- a/extensions/places-menu/placeDisplay.js +++ b/extensions/places-menu/placeDisplay.js @@ -366,7 +366,7 @@ var PlacesManager = class { for (let i = 0; i < dirs.length; i++) { let specialPath = GLib.get_user_special_dir(dirs[i]); - if (specialPath == null || specialPath == homePath) + if (!specialPath || specialPath == homePath) continue; let file = Gio.File.new_for_path(specialPath), info; @@ -415,7 +415,7 @@ var PlacesManager = class { networkVolumes.push(volumes[j]); } else { let mount = volumes[j].get_mount(); - if (mount != null) + if (mount) this._addMount('devices', mount); } } @@ -424,7 +424,7 @@ var PlacesManager = class { /* add all volumes that is not associated with a drive */ let volumes = this._volumeMonitor.get_volumes(); for (let i = 0; i < volumes.length; i++) { - if (volumes[i].get_drive() != null) + if (volumes[i].get_drive()) continue; let identifier = volumes[i].get_identifier('class'); @@ -432,7 +432,7 @@ var PlacesManager = class { networkVolumes.push(volumes[i]); } else { let mount = volumes[i].get_mount(); - if (mount != null) + if (mount) this._addMount('devices', mount); } } diff --git a/extensions/window-list/windowPicker.js b/extensions/window-list/windowPicker.js index cc071e75..901475dc 100644 --- a/extensions/window-list/windowPicker.js +++ b/extensions/window-list/windowPicker.js @@ -24,7 +24,7 @@ let MyWorkspacesDisplay = class extends WorkspacesDisplay { } show(...args) { - if (this._scrollEventId == 0) { + if (!this._scrollEventId) { this._scrollEventId = Main.windowPicker.connect('scroll-event', this._onScrollEvent.bind(this)); } diff --git a/extensions/windowsNavigator/extension.js b/extensions/windowsNavigator/extension.js index 6cad3be7..f5175b19 100644 --- a/extensions/windowsNavigator/extension.js +++ b/extensions/windowsNavigator/extension.js @@ -61,7 +61,7 @@ var MyWorkspace = class extends Workspace.Workspace { } showTooltip() { - if (this._tip == null || this._actualGeometry == null) + if (!this._tip || !this._actualGeometry) return; this._tip.text = (this.metaWorkspace.index() + 1).toString(); @@ -83,7 +83,7 @@ var MyWorkspace = class extends Workspace.Workspace { } hideTooltip() { - if (this._tip == null) + if (!this._tip) return; if (!this._tip.get_parent()) return; @@ -100,14 +100,14 @@ var MyWorkspace = class extends Workspace.Workspace { showWindowsTooltips() { for (let i in this._windowOverlays) { - if (this._windowOverlays[i] != null) + if (this._windowOverlays[i]) this._windowOverlays[i].showTooltip(); } } hideWindowsTooltips() { for (let i in this._windowOverlays) { - if (this._windowOverlays[i] != null) + if (this._windowOverlays[i]) this._windowOverlays[i].hideTooltip(); } }