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

Handle non-string enum values #82

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

P0lip
Copy link
Contributor

@P0lip P0lip commented Oct 5, 2020

No description provided.

@atlassian-cla-bot
Copy link

atlassian-cla-bot bot commented Oct 5, 2020

Hooray! All contributors have signed the CLA.

return null;
}

const bestMatch = allowedValues
const matches = allowedValues
.filter(value => typeof value === 'string')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allowedValues can be numbers too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it produce anything reasonable for numbers, though?
If we don't filter out number here, we will also need to adjust the condition above (line 64)

orgads pushed a commit to orgads/better-ajv-errors that referenced this pull request Dec 3, 2023
chore(deps): update jest monorepo to v29 (major)
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 this pull request may close these issues.

2 participants