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
This commit is contained in:
Florian Müllner 2017-06-13 05:03:17 +02:00
parent b50d7143d1
commit f33560f014

View File

@ -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];