You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2006/10/30 00:35:36 UTC

svn commit: r469035 - /incubator/xap/trunk/src/xap/xml/dom/XapElement.js

Author: mturyn
Date: Sun Oct 29 16:35:35 2006
New Revision: 469035

URL: http://svn.apache.org/viewvc?view=rev&rev=469035
Log:
Fixed case when there are no child nodes.

Modified:
    incubator/xap/trunk/src/xap/xml/dom/XapElement.js

Modified: incubator/xap/trunk/src/xap/xml/dom/XapElement.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/dom/XapElement.js?view=diff&rev=469035&r1=469034&r2=469035
==============================================================================
--- incubator/xap/trunk/src/xap/xml/dom/XapElement.js (original)
+++ incubator/xap/trunk/src/xap/xml/dom/XapElement.js Sun Oct 29 16:35:35 2006
@@ -1026,7 +1026,7 @@
 xap.xml.dom.XapElement.getFirstTextChild = function(node) {
 	var result=null ;
 	var children = node.childNodes ;
-	for(var i=0; i< children.length ; i++) {
+	for(var i=0; node.childNodes && i< children.length ; i++) {
 		if(children[i].nodeType == google.DOM_TEXT_NODE ) {
 			result =  children[i] ;
 			break ;