[gnome-shell/gnome-3-24] ibusManager: Fix a warning



commit 1be2102d295c8577c677f148499e083c3b2cd9a6
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Jun 13 05:03:17 2017 +0200

    ibusManager: Fix a warning
    
    Don't try to access a non-existent engine - it probably makes sense to
    use Map() instead of a plain object to track engines in the future, but
    for now just add an additional check to shut up a warning.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781471

 js/misc/ibusManager.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js
index adf57b3..8c812fe 100644
--- a/js/misc/ibusManager.js
+++ b/js/misc/ibusManager.js
@@ -190,7 +190,7 @@ const IBusManager = new Lang.Class({
     },
 
     getEngineDesc: function(id) {
-        if (!IBus || !this._ready)
+        if (!IBus || !this._ready || !this._engines.hasOwnProperty(id))
             return null;
 
         return this._engines[id];


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