You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2012/10/25 23:41:59 UTC

[8/13] git commit: Don't emit an empty class attribute when the element name does not include any embedded class names

Don't emit an empty class attribute when the element name does not include any embedded class names


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/22bccd5d
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/22bccd5d
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/22bccd5d

Branch: refs/heads/5.4-js-rewrite
Commit: 22bccd5d99885caef23584bfb69a9e4230cc2656
Parents: 92321ef
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Thu Oct 25 11:40:46 2012 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Thu Oct 25 11:40:46 2012 -0700

----------------------------------------------------------------------
 .../META-INF/modules/core/builder.coffee           |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/22bccd5d/tapestry-core/src/main/coffeescript/META-INF/modules/core/builder.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/core/builder.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/core/builder.coffee
index ed42c93..8f5e1bf 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/core/builder.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/core/builder.coffee
@@ -56,7 +56,8 @@ define ["_", "core/spi"], (_, spi) ->
 
     element = document.createElement elementName
 
-    element.className = terms.join " "
+    if terms.length
+      element.className = terms.join " "
 
     return element