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 114f371753
commit 1be2102d29

View File

@ -190,7 +190,7 @@ const IBusManager = new Lang.Class({
}, },
getEngineDesc: function(id) { getEngineDesc: function(id) {
if (!IBus || !this._ready) if (!IBus || !this._ready || !this._engines.hasOwnProperty(id))
return null; return null;
return this._engines[id]; return this._engines[id];