dateMenu: Ignore malformed world-clocks settings
Guard against a malformed setting that doesn't contain a 'location' key. https://bugzilla.gnome.org/show_bug.cgi?id=791148
This commit is contained in:
parent
ac596ca1c1
commit
b7b59d78b5
@ -132,6 +132,8 @@ var WorldClocksSection = new Lang.Class({
|
|||||||
let world = GWeather.Location.get_world();
|
let world = GWeather.Location.get_world();
|
||||||
let clocks = settings.get_value('world-clocks').deep_unpack();
|
let clocks = settings.get_value('world-clocks').deep_unpack();
|
||||||
for (let i = 0; i < clocks.length; i++) {
|
for (let i = 0; i < clocks.length; i++) {
|
||||||
|
if (!clocks[i].location)
|
||||||
|
continue;
|
||||||
let l = world.deserialize(clocks[i].location);
|
let l = world.deserialize(clocks[i].location);
|
||||||
this._locations.push({ location: l });
|
this._locations.push({ location: l });
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user