Преглед изворни кода

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.
pull/552/head
harryi3t пре 10 година
родитељ
комит
ce0659e08d
1 измењених фајлова са 1 додато и 3 уклоњено
  1. +1
    -3
      mustache.js

+ 1
- 3
mustache.js Прегледај датотеку

@@ -551,9 +551,7 @@
}; };


Writer.prototype.unescapedValue = function unescapedValue (token, context) { 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) { Writer.prototype.escapedValue = function escapedValue (token, context) {


Loading…
Откажи
Сачувај