protect the org trail from the top of the tree
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 15 Apr 2009 15:08:15 +0000 (15:08 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 15 Apr 2009 15:08:15 +0000 (15:08 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12875 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js

index b043edf..caaa998 100644 (file)
@@ -174,7 +174,9 @@ if(!dojo._hasResource["fieldmapper.OrgUtils"]){
 
                while( node ) {
                        na.push(node);
-                       node = fieldmapper.aou.findOrgUnit(node.parent_ou());
+                       node = null;
+                       if (node.parent_ou())
+                               node = fieldmapper.aou.findOrgUnit(node.parent_ou());
                }
 
                return na.reverse();