Explorar el Código

fix tag value if statement

pull/662/head
Simon hace 7 años
padre
commit
9c8cc41de5
Se han modificado 1 ficheros con 4 adiciones y 3 borrados
  1. +4
    -3
      mustache.js

+ 4
- 3
mustache.js Ver fichero

@@ -181,9 +181,10 @@

// Get the tag value.
if (type === '=') {
value = scanner.scanUntil(equalsRe);
scanner.scan(equalsRe);
scanner.scanUntil(closingTagRe);
value = scanner.scanUntil(closingTagRe);
if (value.charAt(value.length - 1) !== '=')
throw new Error('Setting in template failure');
value = value.slice(0, -1).trim();
} else if (type === '{') {
value = scanner.scanUntil(closingCurlyRe);
scanner.scan(curlyRe);


Cargando…
Cancelar
Guardar