diff --git a/lib/ect.js b/lib/ect.js index 37bcd61..1042231 100644 --- a/lib/ect.js +++ b/lib/ect.js @@ -136,7 +136,7 @@ bufferStack.push('__ectTemplateContext.blocks[\'' + text.replace(/block\s+('|")([^'"]+)('|").*/, '$2') + '\']'); bufferStackPointer++; prefix = '\'\n'; - postfix = '\n' + bufferStack[bufferStackPointer] + ' += \''; + postfix = '\n' + bufferStack[bufferStackPointer] + ' = \''; text = 'if ' + text; buffer += prefix.replace(newlineExp, '\n' + indentation) + text; if (indent) { @@ -302,7 +302,7 @@ TemplateContext.prototype.block = function (name) { if (!this.blocks[name]) { this.blocks[name] = ''; } - return !this.blocks[name].length; + return true || !this.blocks[name].length; }; TemplateContext.prototype.content = function (block) { @@ -692,4 +692,4 @@ }()); } -}()); \ No newline at end of file +}());