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 2007/04/22 13:49:16 UTC
svn commit: r531179 - /incubator/xap/trunk/codebase/src/xap/util/TypeUtils.js
Author: mturyn
Date: Sun Apr 22 06:49:15 2007
New Revision: 531179
URL: http://svn.apache.org/viewvc?view=rev&rev=531179
Log:
From Rob Gagne
Changes to _unwrapDomType and convertToString (done with James Margaris) to resolve empty text nodes showing up as "object[object]" when data bound.
Modified:
incubator/xap/trunk/codebase/src/xap/util/TypeUtils.js
Modified: incubator/xap/trunk/codebase/src/xap/util/TypeUtils.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/util/TypeUtils.js?view=diff&rev=531179&r1=531178&r2=531179
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/util/TypeUtils.js (original)
+++ incubator/xap/trunk/codebase/src/xap/util/TypeUtils.js Sun Apr 22 06:49:15 2007
@@ -44,7 +44,10 @@
//if it is now a dom type unwrap that
obj = xap.util.TypeUtils._unwrapDomType(obj);
- return "" + obj;
+ if (obj) {
+ return "" + obj;
+ }
+ return obj;
}
@@ -91,6 +94,7 @@
if (obj.firstChild && obj.firstChild.nodeType==google.DOM_TEXT_NODE){
return obj.firstChild.nodeValue;
}
+ return null;
}
}