Skip to content

Commit

Permalink
feat(handlebars): added a new ifEquals helper
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementDreptin committed Oct 1, 2021
1 parent 18989d6 commit b2496b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/controllers/results.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ function addHandlebarsFunctions(handlebars, config) {
return "Recherchées via GROBID";
}
});

handlebars.registerHelper('ifEquals', (v1, v2, options) => (v1 === v2) ? options.fn(this) : options.inverse(this));
}

function generateTermsFacet(facetName, keys, tag, nbTag, data, handlebars) {
Expand Down

0 comments on commit b2496b6

Please sign in to comment.