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

Throw error in case multiple fields / field options are matched #32

Open
4 of 5 tasks
gr2m opened this issue Mar 15, 2022 · 0 comments
Open
4 of 5 tasks

Throw error in case multiple fields / field options are matched #32

gr2m opened this issue Mar 15, 2022 · 0 comments
Labels
bug Something isn't working Pull Request welcome

Comments

@gr2m
Copy link
Owner

gr2m commented Mar 15, 2022

Please avoid duplicates

Reproducible test case

No response

Please select the environment(s) that are relevant to your bug report

  • Browsers
  • Node
  • Deno

Versions

1.3.1

What happened?

In theory, a field configured in the fields constructor option can be matched to multiple project fields when using the matchFieldName constructor option. The same is true for matching field options and the matchFieldOptionValue option.

I think right now the first match wins. But what we should do instead in both cases is to match all fields / field options respectively and verify that there is exactly one match. We throw an error if there is no match. We should also throw an error if there is more than one match

Would you be interested in contributing a fix?

  • yes
@gr2m gr2m added bug Something isn't working Pull Request welcome labels Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Pull Request welcome
Projects
None yet
Development

No branches or pull requests

1 participant