Skip to content

conditionals shouldnt use eval by default #5

@cressie176

Description

@cressie176
{
  condition: '@some.property',
  task: 'foo'
}

throws an exception because the condition is evaluated rather than looked up from the interpolated. This is counter intuitive as most other task attributes are interpolated.

Howabout...

  1. when condition is a function, execute it, passing the context as the first argument. Only support synchronous functions
  2. when the condition is a string starting with @ interpolate it
  3. when the condition is an object support an eval option, e.g.
{
  condition: {
    eval: 'Date.now() > 1435048419884'
  },
  task: 'foo'
}

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions