status/keyboard: Check for monkey-patched property before using it

This avoid another "reference to undefined property" warning.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1035
This commit is contained in:
Florian Müllner 2020-02-20 16:03:54 +01:00 committed by verdre
parent ff39b3274b
commit ee6635282c

View File

@ -715,7 +715,8 @@ var InputSourceManager = class {
if (!window) if (!window)
return; return;
if (window._inputSources != this._inputSources) { if (!window._inputSources ||
window._inputSources !== this._inputSources) {
window._inputSources = this._inputSources; window._inputSources = this._inputSources;
window._currentSource = this._getNewInputSource(window._currentSource); window._currentSource = this._getNewInputSource(window._currentSource);
} }