Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Condition builder: Handle full Expression for "data" condition type #1596

Closed
slavi010 opened this issue Dec 20, 2023 · 0 comments · Fixed by #1600
Closed

Condition builder: Handle full Expression for "data" condition type #1596

slavi010 opened this issue Dec 20, 2023 · 0 comments · Fixed by #1600

Comments

@slavi010
Copy link

Hello!

For the Condition builder, its not possible to do this:
image

The issue is in the file testConditions.js
Where:

if (type.startsWith('data')) {
  let dataPath = data.dataPath.trim().replace('@', '.');
  const isInsideBrackets =
    dataPath.startsWith('{{') && dataPath.endsWith('}}');

  if (isInsideBrackets) {
    dataPath = dataPath.slice(2, -2).trim();
  }

  const parsedPath = keyParser(dataPath, workflowData.refData);
  dataPath = `${parsedPath.dataKey}.${parsedPath.path}`;

  return objectPath.has(workflowData.refData, dataPath); // here
}

Where it should, like for the other, parse it with

await renderString(...);

I doesn't have the time to do a pull request/test it, soo if someone can do it for me, thx ! :)

Have a nice day ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant