From 53ce700cca7d90919b933d102cda5f73fe3261c5 Mon Sep 17 00:00:00 2001 From: frankpagan Date: Fri, 5 Jul 2024 17:28:41 -0500 Subject: [PATCH] fix: parse flag --- src/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index dec79c5..005e54d 100644 --- a/src/index.js +++ b/src/index.js @@ -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') {