From 503e59b12b0cefb4ea0bdb1ab3b5d53cb769c719 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Fri, 24 Jan 2014 13:25:27 -0500 Subject: [PATCH] clean up conditionals only at the very end of parsing --- public/src/templates.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/src/templates.js b/public/src/templates.js index 538bd6b8ac..a004553b7c 100644 --- a/public/src/templates.js +++ b/public/src/templates.js @@ -394,11 +394,11 @@ var regex = new RegExp("{" + namespace + "[\\s\\S]*?}", 'g'); template = template.replace(regex, ''); namespace = ''; + } else { + // clean up all undefined conditionals + template = template.replace(//gi, ''); } - // clean up all undefined conditionals - template = template.replace(//gi, ''); - return template; })(data, "", template);