[open-ils-commits] r15582 - trunk/Open-ILS/web/opac/common/js (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Feb 18 11:02:32 EST 2010


Author: erickson
Date: 2010-02-18 11:02:29 -0500 (Thu, 18 Feb 2010)
New Revision: 15582

Modified:
   trunk/Open-ILS/web/opac/common/js/org_utils.js
Log:
protect against null 'kids' var in for loop

Modified: trunk/Open-ILS/web/opac/common/js/org_utils.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/org_utils.js	2010-02-18 15:56:51 UTC (rev 15581)
+++ trunk/Open-ILS/web/opac/common/js/org_utils.js	2010-02-18 16:02:29 UTC (rev 15582)
@@ -97,7 +97,7 @@
 	if(!me || !org) return false;
 	if(me.id() == org.id()) return true;
     var kids = me.children();
-	for( var i = 0; i < kids.legnth; i++ ) {
+	for( var i = 0; kids && i < kids.legnth; i++ ) {
 		if(orgIsMine(kids[i], org))
 			return true;
 	}



More information about the open-ils-commits mailing list