realmd: Set login format to null on start and update if invalid

We were checking an undefined property but that would lead to a a warning.
Instead we can consider the login format unset until is null, and in case
update it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
This commit is contained in:
Marco Trevisan (Treviño) 2019-05-23 06:12:56 +02:00 committed by Florian Müllner
parent 72566eda43
commit ea5aaa8ab2

View File

@ -21,6 +21,7 @@ var Manager = class {
'/org/freedesktop/realmd', '/org/freedesktop/realmd',
this._reloadRealms.bind(this)); this._reloadRealms.bind(this));
this._realms = {}; this._realms = {};
this._loginFormat = null;
this._signalId = this._aggregateProvider.connect('g-properties-changed', this._signalId = this._aggregateProvider.connect('g-properties-changed',
(proxy, properties) => { (proxy, properties) => {
@ -86,7 +87,7 @@ var Manager = class {
} }
get loginFormat() { get loginFormat() {
if (this._loginFormat !== undefined) if (this._loginFormat)
return this._loginFormat; return this._loginFormat;
this._updateLoginFormat(); this._updateLoginFormat();