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(Cascader): check if options exists before use options.length #18190

Merged
merged 1 commit into from Aug 9, 2019

Conversation

@nnecec
Copy link
Contributor

commented Aug 9, 2019

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

#17538 中增加了对options.length不同情况的处理。在该 pull 合并之前的版本是不会报错的。

我的项目代码之前没有初始化options值,导致现在在页面构建,接口返回数据前,options传入undefined时报错,导致页面崩溃。

请衡量是否需要在组件中增加这个判断。

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese 修复 cascader options 参数未传入数组类型导致页面崩溃

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@pr-triage pr-triage bot added the PR: unreviewed label Aug 9, 2019

@netlify

This comment has been minimized.

Copy link

commented Aug 9, 2019

Deploy preview for ant-design ready!

Built with commit 82ca392

https://deploy-preview-18190--ant-design.netlify.com

@afc163 afc163 merged commit 03189b3 into ant-design:master Aug 9, 2019

18 of 22 checks passed

ci/circleci: compile Your tests failed on CircleCI
Details
ci/circleci: lint Your tests failed on CircleCI
Details
Header rules - ant-design No header rules processed
Details
Pages changed - ant-design 214 new files uploaded
Details
DEP All dependencies are resolved
LGTM analysis: JavaScript No new or fixed alerts
Details
Mixed content - ant-design No mixed content detected
Details
Redirect rules - ant-design 18 redirect rules processed
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
ant-design.ant-design #ant design succeeded
Details
buildsize No significant change
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
netlify/ant-design/deploy-preview Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No new issues
Details

@pr-triage pr-triage bot added PR: merged and removed PR: unreviewed labels Aug 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.