From 9ecfb85b941547e3089a0f696a069e961710a40b Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 9 Apr 2008 16:10:07 +0000 Subject: [PATCH] protect against empty list items git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@9280 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/patron/user_edit.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Open-ILS/xul/staff_client/server/patron/user_edit.js b/Open-ILS/xul/staff_client/server/patron/user_edit.js index 9f78774a35..c67d1f8e6b 100644 --- a/Open-ILS/xul/staff_client/server/patron/user_edit.js +++ b/Open-ILS/xul/staff_client/server/patron/user_edit.js @@ -286,6 +286,8 @@ function grep ( code, list ) { function trim_ou_tree (tree, list) { for (var i in tree) { + if (!tree) continue; + var type = grep( function(x) {return x.id() == tree[i].ou_type()}, ou_type_list )[0]; if ( type && type.can_have_users() == 't' ) list.push(tree[i]); -- 2.11.0