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

forAnyValueIfExists should pass if environment doesn't have the key #23

Open
broom9 opened this issue Jul 16, 2019 · 0 comments
Open

forAnyValueIfExists should pass if environment doesn't have the key #23

broom9 opened this issue Jul 16, 2019 · 0 comments

Comments

@broom9
Copy link

broom9 commented Jul 16, 2019

See the ok2 condition below. Please let me know if you agree.

const condition = {
  stringEquals: {
    forAnyValueIfExists: {
      foo: ['bar', 'baz', 'boo']
    }
  }
};


const ok = {
  foo: ['bar', 'booz', undefined] // This will pass because bar is an accepted value
};

const ok2 = {
  foo: undefined  // This should pass for the same logic as simpleValueIfExists. Currently, this doesn't pass
};

In the use case I have, sometimes the env has a groupId that needs to be matched against a list of IDs to see if it matches any of them. Sometimes the env doesn't have this groupId attribute and it should allow (condition match) in this case.

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

No branches or pull requests

2 participants