ibusManager: Use const correctly

Per ES6, a variable declared const should only be valid inside its lexical
scope. Previously, GJS would accept this code, but that will change in the
SpiderMonkey JS engine in the next release of GJS.

https://bugzilla.gnome.org/show_bug.cgi?id=778425
This commit is contained in:
Philip Chimento 2017-02-09 18:11:28 -08:00 committed by Philip Chimento
parent d017e6749c
commit f7752ac699

View File

@ -6,10 +6,11 @@ const Lang = imports.lang;
const Mainloop = imports.mainloop; const Mainloop = imports.mainloop;
const Signals = imports.signals; const Signals = imports.signals;
let IBusCandidatePopup;
try { try {
var IBus = imports.gi.IBus; var IBus = imports.gi.IBus;
_checkIBusVersion(1, 5, 2); _checkIBusVersion(1, 5, 2);
const IBusCandidatePopup = imports.ui.ibusCandidatePopup; IBusCandidatePopup = imports.ui.ibusCandidatePopup;
} catch (e) { } catch (e) {
var IBus = null; var IBus = null;
log(e); log(e);