Переглянути джерело

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) {
var value = context.lookup(token[1]);
if (value != null)
return value;
return context.lookup(token[1]);
};

Writer.prototype.escapedValue = function escapedValue (token, context) {


Завантаження…
Відмінити
Зберегти