Skip to content

Commit

Permalink
preparation of 2.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybesson committed Sep 6, 2016
1 parent 1c952c8 commit fc93850
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions dist/cli/handlebars/utils/isTrue.js
Expand Up @@ -19,9 +19,19 @@ function isTrue(v1, operator, v2) {
case '>=':
return v1 >= v2;
case '&&':
return v1 && v2;
var eval1 = false;
var eval2 = false;
if (v1 && !Array.isArray(v1) || v1.length > 0) eval1 = true;
if (v2 && !Array.isArray(v2) || v2.length > 0) eval2 = true;

return eval1 && eval2;
case '||':
return v1 || v2;
var eval1 = false;
var eval2 = false;
if (v1 && !Array.isArray(v1) || v1.length > 0) eval1 = true;
if (v2 && !Array.isArray(v2) || v2.length > 0) eval2 = true;

return eval1 || eval2;
default:
return false;
}
Expand Down

0 comments on commit fc93850

Please sign in to comment.