Skip to content

Commit

Permalink
fix: parse flag
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Jul 5, 2024
1 parent 68df573 commit 53ce700
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,15 +578,21 @@ function checkCondition(condition, value) {
if (operatorMatch)
condition = operatorMatch[2].trim()

let parse = true
if (condition === 'true') {
return !!value[0];
} else if (condition === 'false') {
return !value[0];
} else if (condition === '[]' && typeof value[0] === 'string') {
parse = false
}



// TODO: why parse updated conditin to boolean false
if (condition !== 'false')
if (parse && condition !== 'false')
condition = parseCondition(condition);

let result;

if (condition === '$template') {
Expand Down

0 comments on commit 53ce700

Please sign in to comment.