From 1b2bc96cb352a18e153a6c30da9bfce3f72f85bb Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 21 Feb 2006 19:52:37 +0000 Subject: [PATCH] stat_cat_entries not set on new copies git-svn-id: svn://svn.open-ils.org/ILS/trunk@3150 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/cat/copy_editor.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js index 2b6fe9ef97..7991a0ed76 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -127,6 +127,7 @@ function my_init() { /* Other stat cats present on these copies */ for (var i = 0; i < g.copies.length; i++) { var entries = g.copies[i].stat_cat_entries(); + if (!entries) entries = []; for (var j = 0; j < entries.length; j++) { var sc_id = entries[j].stat_cat(); add_stat_cat( sc_id ); @@ -172,6 +173,7 @@ g.apply_stat_cat = function(sc_id,entry_id) { try { copy.ischanged('1'); var temp = copy.stat_cat_entries(); + if (!temp) temp = []; temp = util.functional.filter_list( temp, function (obj) { -- 2.43.2