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
b7b59d78b5
commit
a3736d3a39
@ -135,6 +135,7 @@ var WorldClocksSection = new Lang.Class({
|
||||
if (!clocks[i].location)
|
||||
continue;
|
||||
let l = world.deserialize(clocks[i].location);
|
||||
if (l)
|
||||
this._locations.push({ location: l });
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user