[gnome-shell] keyboard: Remove unnecessary boolean cast
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] keyboard: Remove unnecessary boolean cast
- Date: Mon, 1 Jul 2019 21:15:16 +0000 (UTC)
commit b87455c089a34e427e4b43dcad89d87fe527b3e7
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Jun 30 00:33:20 2019 +0200
keyboard: Remove unnecessary boolean cast
In contexts where a statement (like if or while) expects a condition,
any expression will be implicitly cast to boolean already without
C-isms like double negation.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/606
js/ui/status/keyboard.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index ff2456a60..17abe8a92 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -227,7 +227,7 @@ var InputSourceSystemSettings = class extends InputSourceSettings {
for (let i = 0; i < layouts.length && !!layouts[i]; i++) {
let id = layouts[i];
- if (!!variants[i])
+ if (variants[i])
id += '+' + variants[i];
sourcesList.push({ type: INPUT_SOURCE_TYPE_XKB, id: id });
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]