Sfoglia il codice sorgente

throw inside the if

tags/0.6.0
Michael Jackson 13 anni fa
parent
commit
52c7e43a5f
1 ha cambiato i file con 6 aggiunte e 6 eliminazioni
  1. +6
    -6
      mustache.js

+ 6
- 6
mustache.js Vedi File

@@ -376,14 +376,14 @@ var Mustache;
}

function escapeTags(tags) {
if (tags.length === 2) {
return [
new RegExp(escapeRe(tags[0]) + "\\s*"),
new RegExp("\\s*" + escapeRe(tags[1]))
];
if (tags.length !== 2) {
throw new Error("Invalid tags: " + tags.join(" "));
}

throw new Error("Invalid tags: " + tags.join(" "));
return [
new RegExp(escapeRe(tags[0]) + "\\s*"),
new RegExp("\\s*" + escapeRe(tags[1]))
];
}

/**


Loading…
Annulla
Salva