[open-ils-commits] r12875 - trunk/Open-ILS/web/js/dojo/fieldmapper (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Apr 15 11:08:18 EDT 2009


Author: miker
Date: 2009-04-15 11:08:15 -0400 (Wed, 15 Apr 2009)
New Revision: 12875

Modified:
   trunk/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js
Log:
protect the org trail from the top of the tree

Modified: trunk/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js	2009-04-15 14:15:58 UTC (rev 12874)
+++ trunk/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js	2009-04-15 15:08:15 UTC (rev 12875)
@@ -174,7 +174,9 @@
 
 		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();



More information about the open-ils-commits mailing list