From: miker Date: Wed, 9 Apr 2008 16:10:07 +0000 (+0000) Subject: protect against empty list items X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9ecfb85b941547e3089a0f696a069e961710a40b;p=Evergreen.git protect against empty list items git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@9280 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- 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]);