[gnome-shell/drop-osk-key-repeat-feature: 1/2] keyboard: Use === instead of == when comparing actions




commit f5293a56e68323e11fb1cae9bda40b864153eb3d
Author: Ray Strode <rstrode redhat com>
Date:   Wed Oct 6 16:04:30 2021 -0400

    keyboard: Use === instead of == when comparing actions
    
    This just updates a part of the code to follow current recommended
    practice for equality testing, in preparation for it to be updated.

 js/ui/keyboard.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 639a742737..f08ff8fd17 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -1565,13 +1565,13 @@ var Keyboard = GObject.registerClass({
                 }
             });
             extraButton.connect('released', () => {
-                if (keyval != null)
+                if (keyval)
                     this._keyboardController.keyvalRelease(keyval);
-                else if (action == 'hide')
+                else if (action === 'hide')
                     this.close();
-                else if (action == 'languageMenu')
+                else if (action === 'languageMenu')
                     this._popupLanguageMenu(actor);
-                else if (action == 'emoji')
+                else if (action === 'emoji')
                     this._toggleEmoji();
             });
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]