Permalink
Browse files

sort-group: do not account repeating predicates

  • Loading branch information...
1 parent 93ac464 commit c2c2c1404724dea203ad9bed3f45b88af025f585 @indutny indutny committed Mar 14, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/xjst/engines/sort-group.js
@@ -82,8 +82,11 @@ exports.execute = function engine(templates, options, config) {
var chart = {};
templates.forEach(function(template) {
+ var seen = {};
template[0].forEach(function(match) {
var key = match[0];
+ if (seen[key]) return;
+ seen[key] = true;
if (!utils.isSimple(match[1])) {
chart[key] = -Infinity;

0 comments on commit c2c2c14

Please sign in to comment.