From 82102f238af5e2a623fce69a9ee0a55567a8fbff Mon Sep 17 00:00:00 2001 From: Aaron Dufour Date: Tue, 2 Oct 2012 17:39:50 -0400 Subject: [PATCH] if compiling tokens w/o template, use empty string in place of template text --- mustache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mustache.js b/mustache.js index 7165a8aba..9bba495a5 100644 --- a/mustache.js +++ b/mustache.js @@ -345,7 +345,7 @@ var Mustache; switch (token[0]) { case "#": - sectionText = template.slice.apply(template, sectionBounds(token)); + sectionText = template == null ? null : template.slice.apply(template, sectionBounds(token)); buffer += writer._section(token[1], context, sectionText, subRender(i, token[4], template)); break; case "^":