From 6e4bd7f86b89a8e44b0c540a8186a011e2931071 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Mon, 3 May 2010 10:52:20 +0200 Subject: [PATCH] Clear buffer before rendering. Closes #26. --- mustache.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mustache.js b/mustache.js index cc59bdd..fe87d9f 100644 --- a/mustache.js +++ b/mustache.js @@ -17,6 +17,9 @@ var Mustache = function() { }, render: function(template, context, partials, in_recursion) { + // reset buffer + // TODO: make this non-lazy + this.buffer = []; // fail fast if(!this.includes("", template)) { if(in_recursion) {