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

refactor(breadcrumb): make title null and undefined causes the same b… #43099

Merged
merged 3 commits into from Jun 21, 2023
Merged

refactor(breadcrumb): make title null and undefined causes the same b… #43099

merged 3 commits into from Jun 21, 2023

Conversation

Asanio06
Copy link
Contributor

@Asanio06 Asanio06 commented Jun 19, 2023

When the title of an item is set to undefined, the item is not taken into account. Unfortunately the behaviour is not the same when the title is set to null. I use React 17 and when I don't want to display anything with a component, I return a null element to make it a valid JSX element.

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English refactor(breadcrumb): make title null and undefined causes the same behaviour
🇨🇳 Chinese

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • 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

🚀 Summary

🤖 Generated by Copilot at 190decc

Fixed a bug in useItemRender hook that caused an error when route.title was null. Updated the condition for returning null from getBreadcrumbName in components/breadcrumb/useItemRender.tsx.

🔍 Walkthrough

🤖 Generated by Copilot at 190decc

  • Fix a bug where a null title in a breadcrumb route would cause an error in useItemRender (link)

@github-actions
Copy link
Contributor

  • 🚨 Please fill changelog in the PR

    • Write with a developer-oriented perspective and narrative method, without describing the details of the repair
    • Describing the problem and the impact on the developer
    • describing the user-first site problem, not your solution
    • Refer: https://ant.design/changelog#501
  • 🚨 请填写 PR 中的 changelog

    • 请用面向开发者的角度叙述方式撰写,不描述修复细节
    • 描述问题和对开发者的影响
    • 描述用户第一现场的问题,而非你的解决方式
    • 参考:https://ant.design/changelog-cn#501

@github-actions
Copy link
Contributor

github-actions bot commented Jun 19, 2023

@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (88ad660) 100.00% compared to head (3d19af2) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #43099   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          648       648           
  Lines        10959     10959           
  Branches      2975      2975           
=========================================
  Hits         10959     10959           
Impacted Files Coverage Δ
components/breadcrumb/useItemRender.tsx 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@afc163 afc163 merged commit e78e2cb into ant-design:master Jun 21, 2023
52 checks passed
@PeachScript PeachScript mentioned this pull request Jun 25, 2023
20 tasks
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