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(validator): getValidatorLocale Maximum call stack size exceeded #2273

Merged
merged 2 commits into from
Oct 9, 2021

Conversation

wakeGISer
Copy link
Contributor

Before submitting a pull request, please make sure the following is done...

  • Ensure the pull request title and commit message follow the Commit Specific in English.
  • Fork the repo and create your branch from master or formily_next.
  • If you've added code that should be tested, add tests!
  • If you've changed APIs, update the documentation.
  • Ensure the test suite passes (npm test).
  • Make sure your code lints (npm run lint) - we've done our best to make sure these rules match our internal linting guidelines.

Please do not delete the above content


What have you changed?

In @formily/validator, when we set the browser lang is Vietnam language. The result of getLocaleByPath('pattern') will always be undefined and the getValidatorLocale function will be maximum cal stack size exceeded. The PR fix doesn't loop call getValidatorLocale function by itself

@CLAassistant
Copy link

CLAassistant commented Oct 8, 2021

CLA assistant check
All committers have signed the CLA.

@wakeGISer wakeGISer closed this Oct 8, 2021
@wakeGISer wakeGISer reopened this Oct 8, 2021
@codecov
Copy link

codecov bot commented Oct 8, 2021

Codecov Report

Merging #2273 (ef41c80) into formily_next (9ed17eb) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##           formily_next    #2273   +/-   ##
=============================================
  Coverage         95.29%   95.29%           
=============================================
  Files               138      138           
  Lines              6099     6100    +1     
  Branches           1538     1539    +1     
=============================================
+ Hits               5812     5813    +1     
  Misses              282      282           
  Partials              5        5           
Impacted Files Coverage Δ
packages/validator/src/registry.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9ed17eb...ef41c80. Read the comment docs.

@janryWang
Copy link
Collaborator

麻烦加一下单测

@wakeGISer
Copy link
Contributor Author

麻烦加一下单测

已添加, 麻烦看下

@janryWang janryWang merged commit 200253e into alibaba:formily_next Oct 9, 2021
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.

3 participants