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

chore: remove unnecessary arguments #122

Merged
merged 1 commit into from
May 23, 2022

Conversation

is2ei
Copy link
Contributor

@is2ei is2ei commented May 23, 2022

This PR removes unnecessary arguments and improves test coverage.

In #40, a workaround is added to avoid the undefined error.
It says "In some cases" but it is actually "In all cases" because the arguments are changed in v7.
Ref: ajv-validator/ajv@9e2e6b9#diff-489d67aa91e09063da5c34330526703a13b3cdedf7d86426173d0bc62183b6c7L36-L50

Now there are 2 arguments data and dataCxt.
Ref: https://github.com/ajv-validator/ajv/blob/master/lib/types/index.ts#L50-L57
Ref2: https://github.com/ajv-validator/ajv/blob/master/lib/vocabularies/code.ts#L75-L91

Therefore, I guess we can remove the if statement.

Checklist

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit e69f000 into fastify:master May 23, 2022
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