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
Merged

fix(Cascader): check if options exists before use options.length #18190

merged 1 commit into from Aug 9, 2019

Conversation

nnecec
Copy link
Contributor

@nnecec nnecec 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

@netlify
Copy link

netlify bot commented Aug 9, 2019

Deploy preview for ant-design ready!

Built with commit 82ca392

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

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.

None yet

2 participants