calendar: Avoid a warning
We will always get a results array from gjs' proxy wrapper, but it will be empty in the error case; that is, `results` is always defined, but `results[0]` may not be. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/626
This commit is contained in:
parent
7d2c5c1ac9
commit
c765082f72
@ -237,7 +237,7 @@ var DBusEventSource = class DBusEventSource {
|
||||
|
||||
_onEventsReceived(results, error) {
|
||||
let newEvents = [];
|
||||
let appointments = results ? results[0] : null;
|
||||
let appointments = results[0] || null;
|
||||
if (appointments != null) {
|
||||
for (let n = 0; n < appointments.length; n++) {
|
||||
let a = appointments[n];
|
||||
|
Loading…
Reference in New Issue
Block a user