Reviewers: shindig-dev,

Description:
There was a bug in compiler.js where it was processing a <select> DOM
element as an array of other elements because it had the length
property.

Please review this at http://codereview.appspot.com/6452

Affected files:
  features/opensocial-templates/compiler.js


Index: features/opensocial-templates/compiler.js
===================================================================
--- features/opensocial-templates/compiler.js   (revision 700524)
+++ features/opensocial-templates/compiler.js   (working copy)
@@ -450,7 +450,8 @@
       for (var child = node.firstChild; child; child = child.nextSibling) {
         var compiledChild = os.compileNode_(child);
         if (compiledChild) {
-          if (typeof(compiledChild.length) == 'number') {
+          if (!compiledChild.tagName &&
+            typeof(compiledChild.length) == 'number') {
             for (var i = 0; i < compiledChild.length; i++) {
               output.appendChild(compiledChild[i]);
             }


Reply via email to