diff --git a/public/scripts/variables.js b/public/scripts/variables.js index 81ecce313..3f154056c 100644 --- a/public/scripts/variables.js +++ b/public/scripts/variables.js @@ -510,12 +510,8 @@ function evalBoolean(rule, a, b) { * @returns {Promise} Pipe result */ async function executeSubCommands(command, scope = null) { - if (command.startsWith('"')) { - command = command.slice(1); - } - - if (command.endsWith('"')) { - command = command.slice(0, -1); + if (command.startsWith('"') && command.endsWith('"')) { + command = command.slice(1, -1); } const result = await executeSlashCommands(command, true, scope);