[gnome-shell] calendar: Handle calendar-server errors
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-shell] calendar: Handle calendar-server errors
- Date: Wed, 24 Oct 2012 16:26:53 +0000 (UTC)
commit a4e29e1244b097fc2bebc371e00d7af30537c376
Author: Florian MÃllner <fmuellner gnome org>
Date:   Tue Oct 23 14:32:27 2012 +0200
    calendar: Handle calendar-server errors
    
    The current code assumes that the GetEvents call will always
    receive, causing an exception in the error case.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686805
 js/ui/calendar.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index 7ee01cf..3a3e73c 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -270,8 +270,9 @@ const DBusEventSource = new Lang.Class({
         this._loadEvents(false);
     },
 
-    _onEventsReceived: function([appointments]) {
+    _onEventsReceived: function(results, error) {
         let newEvents = [];
+        let appointments = results ? results[0] : null;
         if (appointments != null) {
             for (let n = 0; n < appointments.length; n++) {
                 let a = appointments[n];
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]