Permalink
Browse files

Closes #15 Merge branch 'loop-reduce'

  • Loading branch information...
2 parents 7b9ab5d + abf2cf1 commit 13d1ae585ac7eb8433cba3f95681c0e9450d47eb @erikvold erikvold committed Jan 28, 2011
Showing with 4 additions and 6 deletions.
  1. +4 −6 src/Node.js
View
@@ -141,13 +141,11 @@ Jaml.Node.prototype = {
* @return {Boolean} True if this tag should close itself
*/
isSelfClosing: function() {
- var selfClosing = true;
-
- for (var i = this.notSelfClosingTags.length - 1; i >= 0; i--){
- if (this.tagName == this.notSelfClosingTags[i]) selfClosing = false;
+ for (var i = this.notSelfClosingTags.length - 1; i >= 0; i--) {
+ if (this.tagName == this.notSelfClosingTags[i]) return false;
}
-
- return selfClosing;
+
+ return true;
},
/**

0 comments on commit 13d1ae5

Please sign in to comment.