dateMenu: Fix possible crash with unknown locations
If there are locations unknown to the libgweather version gnome-shell is using, don't crash. JS ERROR: TypeError: b.location is null WorldClocksSection<._clocksChanged/<@resource:///org/gnome/shell/ui/dateMenu.js:141:1 WorldClocksSection<._clocksChanged@resource:///org/gnome/shell/ui/dateMenu.js:139:9 https://bugzilla.gnome.org/show_bug.cgi?id=791148
This commit is contained in:
parent
a29ceb31dd
commit
29987ae033
@ -135,6 +135,7 @@ var WorldClocksSection = new Lang.Class({
|
|||||||
if (!clocks[i].location)
|
if (!clocks[i].location)
|
||||||
continue;
|
continue;
|
||||||
let l = world.deserialize(clocks[i].location);
|
let l = world.deserialize(clocks[i].location);
|
||||||
|
if (l)
|
||||||
this._locations.push({ location: l });
|
this._locations.push({ location: l });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user