Browse Source

Fixed JS error

master
Christoph Haas 1 year ago
parent
commit
f89f96dc59
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      js/data/Actions.js

+ 2
- 2
js/data/Actions.js View File

@@ -128,7 +128,7 @@ Zarafa.plugins.calendarimporter.data.Actions = {
128 128
         var inbox = container.getHierarchyStore().getDefaultStore();
129 129
         var pub = container.getHierarchyStore().getPublicStore();
130 130
 
131
-        if (!Ext.isEmpty(inbox.subStores) && inbox.subStores.folders.totalLength > 0) {
131
+        if (!Ext.isEmpty(inbox) && !Ext.isEmpty(inbox.subStores)) {
132 132
             for (var i = 0; i < inbox.subStores.folders.totalLength; i++) {
133 133
                 var folder = inbox.subStores.folders.getAt(i);
134 134
                 if (!Ext.isEmpty(folder) && folder.get("container_class") == "IPF.Appointment") {
@@ -149,7 +149,7 @@ Zarafa.plugins.calendarimporter.data.Actions = {
149 149
             }
150 150
         }
151 151
 
152
-        if (!Ext.isEmpty(pub.subStores) && pub.subStores.folders.totalLength > 0) {
152
+        if (!Ext.isEmpty(pub) && !Ext.isEmpty(pub.subStores)) {
153 153
             for (var j = 0; j < pub.subStores.folders.totalLength; j++) {
154 154
                 var folder = pub.subStores.folders.getAt(j);
155 155
                 if (!Ext.isEmpty(folder) && folder.get("container_class") == "IPF.Appointment") {

Loading…
Cancel
Save