From ce0659e08dd9f1d4a8d28ba91012419b71bc1549 Mon Sep 17 00:00:00 2001 From: harryi3t <66hari@gmail.com> Date: Thu, 10 Mar 2016 16:59:10 +0530 Subject: [PATCH] Simplifies multiple statements into one We don't need these 3 statements. We can simple return the output of context.lookup function. Even it is null, returning null instead of underfined seems to have no side effect. --- mustache.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mustache.js b/mustache.js index 53ec272..5e6e8a0 100644 --- a/mustache.js +++ b/mustache.js @@ -551,9 +551,7 @@ }; Writer.prototype.unescapedValue = function unescapedValue (token, context) { - var value = context.lookup(token[1]); - if (value != null) - return value; + return context.lookup(token[1]); }; Writer.prototype.escapedValue = function escapedValue (token, context) {