event could be undefined or empty
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 26 Nov 2012 08:50:18 +0000 (09:50 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 26 Nov 2012 09:43:13 +0000 (10:43 +0100)
Change-Id: Ia57c8fa9c3c5b86032f720a1b84ae8932e921a37
Reviewed-on: https://gerrit.tine20.org/tine20/1402
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: jenkins user
tine20/Calendar/js/iMIPDetailsPanel.js

index 223f6de..45f99c5 100644 (file)
@@ -47,18 +47,18 @@ Tine.Calendar.iMIPDetailsPanel = Ext.extend(Tine.Calendar.EventDetailsPanel, {
      */
     initComponent: function() {
         this.app = Tine.Tinebase.appMgr.get('Calendar');
-
+        
         this.iMIPrecord = new Tine.Calendar.Model.iMIP(this.preparedPart.preparedData);
-        if (! Ext.isFunction(this.iMIPrecord.get('event').beginEdit)) {
+        if (! this.iMIPrecord.get('event') || ! Ext.isFunction(this.iMIPrecord.get('event').beginEdit)) {
             this.iMIPrecord.set('event', Tine.Calendar.backend.recordReader({
                 responseText: Ext.util.JSON.encode(this.preparedPart.preparedData.event)
             }));
         }
-
+        
         this.initIMIPToolbar();
-
+        
         this.on('afterrender', this.showIMIP, this);
-
+        
         Tine.Calendar.iMIPDetailsPanel.superclass.initComponent.call(this);
     },