From 1be2102d295c8577c677f148499e083c3b2cd9a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 13 Jun 2017 05:03:17 +0200 Subject: [PATCH] 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 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js index adf57b3c8..8c812feb1 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];