From 2e4f96d40a50eda63ea01902612b6c231def5488 Mon Sep 17 00:00:00 2001 From: HaveAGitGat Date: Tue, 7 May 2024 06:33:30 +0000 Subject: [PATCH] Apply auto-build changes --- .../tools/checkFlowVariable/1.0.0/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js index 3f366b4..7ef26ce 100644 --- a/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js @@ -47,7 +47,7 @@ var details = function () { return ({ inputUI: { type: 'text', }, - tooltip: "Value of variable to check. \n For == condition, you can specify multiple values separated by comma. For example: value1,value2,value3\n If the variable matches any of the values, the condition is true.\n ", + tooltip: "Value of variable to check. \nYou can specify multiple values separated by comma. For example: value1,value2,value3", }, ], outputs: [ @@ -99,24 +99,24 @@ var plugin = function (args) { } targetValue = String(targetValue); var outputNumber = 1; + var valuesArr = value.trim().split(','); if (condition === '==') { - var valuesArr = value.trim().split(','); if (valuesArr.includes(targetValue)) { args.jobLog("Variable ".concat(variable, " of value ").concat(targetValue, " matches condition ").concat(condition, " ").concat(valuesArr)); outputNumber = 1; } else { - args.jobLog("Variable ".concat(variable, " of value ").concat(targetValue, " does not match condition ").concat(condition, " ").concat(value)); + args.jobLog("Variable ".concat(variable, " of value ").concat(targetValue, " does not match condition ").concat(condition, " ").concat(valuesArr)); outputNumber = 2; } } else if (condition === '!=') { - if (targetValue !== value) { - args.jobLog("Variable ".concat(variable, " of value ").concat(targetValue, " matches condition ").concat(condition, " ").concat(value)); + if (!valuesArr.includes(targetValue)) { + args.jobLog("Variable ".concat(variable, " of value ").concat(targetValue, " matches condition ").concat(condition, " ").concat(valuesArr)); outputNumber = 1; } else { - args.jobLog("Variable ".concat(variable, " of value ").concat(targetValue, " does not match condition ").concat(condition, " ").concat(value)); + args.jobLog("Variable ".concat(variable, " of value ").concat(targetValue, " does not match condition ").concat(condition, " ").concat(valuesArr)); outputNumber = 2; } }