Explorar el Código

Merge remote-tracking branch 'upstream/master'

tags/0.7.1
Michael Jackson hace 13 años
padre
commit
829698388c
Se han modificado 4 ficheros con 11 adiciones y 1 borrados
  1. +2
    -1
      mustache.js
  2. +7
    -0
      test/_files/check_falsy.js
  3. +1
    -0
      test/_files/check_falsy.mustache
  4. +1
    -0
      test/_files/check_falsy.txt

+ 2
- 1
mustache.js Ver fichero

@@ -254,7 +254,8 @@ var Mustache;
return self.render(template, context);
};

return value.call(context.view, text, scopedRender) || "";
var result = value.call(context.view, text, scopedRender);
return result != null ? result : "";
default:
if (value) {
return callback(this, context);


+ 7
- 0
test/_files/check_falsy.js Ver fichero

@@ -0,0 +1,7 @@
({
number: function(text, render) {
return function(text, render) {
return +render(text);
}
}
})

+ 1
- 0
test/_files/check_falsy.mustache Ver fichero

@@ -0,0 +1 @@
<p>{{#number}}0{{/number}}</p>

+ 1
- 0
test/_files/check_falsy.txt Ver fichero

@@ -0,0 +1 @@
<p>0</p>

Cargando…
Cancelar
Guardar