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

Fix repeated calling of validator function #95

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Conversation

nighca
Copy link
Collaborator

@nighca nighca commented Jan 25, 2024

Fix #94

In #69 we merged doValidation & applyValdiation, so we can no longer decide if validation is triggered by checking this.validation

Copy link
Collaborator

@lzfee0227 lzfee0227 left a comment

Choose a reason for hiding this comment

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

lgtm


// 若 `validation` 未发生变更,意味着未发生新的校验行为
// 若上边操作未触发自动的校验行为,强制调用之
if (this.validation === validation) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

没这个之后代码好懂多了…

@nighca nighca merged commit 9ef719f into qiniu:master Jan 25, 2024
2 checks passed
@nighca nighca mentioned this pull request Jan 29, 2024
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.

First validate() call runs validator function twice
2 participants