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
74683b7ef7
commit
a29ceb31dd
@ -132,6 +132,8 @@ var WorldClocksSection = new Lang.Class({
|
||||
let world = GWeather.Location.get_world();
|
||||
let clocks = settings.get_value('world-clocks').deep_unpack();
|
||||
for (let i = 0; i < clocks.length; i++) {
|
||||
if (!clocks[i].location)
|
||||
continue;
|
||||
let l = world.deserialize(clocks[i].location);
|
||||
this._locations.push({ location: l });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user