fix Acq -> Update Barcodes post-parts
authorJason Etheridge <jason@esilibrary.com>
Fri, 2 Sep 2011 03:18:03 +0000 (23:18 -0400)
committerJason Etheridge <jason@esilibrary.com>
Fri, 2 Sep 2011 03:19:56 +0000 (23:19 -0400)
Items from acquisitions were having null instead of [] for .parts()

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js

index 127d5c4..aecfe20 100644 (file)
@@ -735,7 +735,7 @@ g.render_barcode_entry = function(node,callnumber_composite_key,count,ou_id) {
                 tb.setAttribute('acp_id', g.org_label_existing_copy_map[ ou_id ][ callnumber_composite_key ][i].id());
                 var temp_parts = g.org_label_existing_copy_map[ ou_id ][ callnumber_composite_key ][i].parts();
                 temp_parts = util.functional.filter_list(
-                    temp_parts,
+                    temp_parts || [],
                     function(p) {
                         return p.record() == g.doc_id; // filter out foreign parts
                     }