This function also gets used with authority queues, so don't assume import_items()
authorJason Etheridge <jason@esilibrary.com>
Sat, 14 May 2011 17:40:36 +0000 (13:40 -0400)
committerJason Etheridge <jason@esilibrary.com>
Sat, 14 May 2011 17:40:36 +0000 (13:40 -0400)
Open-ILS/web/js/ui/default/vandelay/vandelay.js

index ea06944..e78ebcc 100644 (file)
@@ -675,7 +675,10 @@ function vlGetViewErrors(rowIdx, item) {
         // id:rec_error:item_import_error_count
         return id + ':' + 
             (rec.import_error() ? 1 : '') + ':' + 
-            rec.import_items().filter(function(i) {return i.import_error()}).length;
+            (typeof rec.import_items == 'function'
+                ? rec.import_items().filter(function(i) {return i.import_error()}).length
+                :''
+            );
     }
     return -1
 }