From: miker Date: Mon, 25 Jun 2007 01:22:06 +0000 (+0000) Subject: bah ... no implicit return from javascript function X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e74cac9049c3fe76e50313d8241c81d710b18eb3;p=Evergreen.git bah ... no implicit return from javascript function git-svn-id: svn://svn.open-ils.org/ILS/trunk@7469 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 dff0c843b9..ea71cdcc25 100644 --- a/Open-ILS/xul/staff_client/server/patron/user_edit.js +++ b/Open-ILS/xul/staff_client/server/patron/user_edit.js @@ -265,14 +265,9 @@ function grep ( code, list ) { function trim_ou_tree (tree, list) { for (var i in tree) { - if ( - grep( - function(x) {x.id() == tree[i].ou_type()}, - ou_type_list - )[0].can_have_users() - ) { + var type = grep( function(x) {return x.id() == tree[i].ou_type()}, ou_type_list )[0]; + if ( type && type.can_have_users() ) list.push(tree[i]); - } if (tree[i].children()) trim_ou_tree(tree[i].children(), list); }