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(v2): fix index page features.length when 0 #2751

Merged
merged 1 commit into from
May 15, 2020
Merged

fix(v2): fix index page features.length when 0 #2751

merged 1 commit into from
May 15, 2020

Conversation

jdeniau
Copy link
Contributor

@jdeniau jdeniau commented May 15, 2020

Motivation

If features is an empty array, a "0" is displayed instead of the feature list :

image

This is because :

const features = []

features && features.length && 'anything' // will return "0"

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

I don't think it really needs a test plan, but feel free to correct me if you really want this tested

@jdeniau jdeniau requested a review from yangshun as a code owner May 15, 2020 13:18
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label May 15, 2020
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit 250b37d

https://deploy-preview-2751--docusaurus-2.netlify.app

@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit 650489d

https://deploy-preview-2751--docusaurus-2.netlify.app

Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

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

Thanks!

@yangshun yangshun changed the title Fix feature.length if 0 fix(v2): fix index page features.length when 0 May 15, 2020
@yangshun yangshun added the pr: bug fix This PR fixes a bug in a past release. label May 15, 2020
@yangshun yangshun merged commit 29506be into facebook:master May 15, 2020
@lex111 lex111 added this to the v2.0.0-alpha.55 milestone May 19, 2020
@jdeniau jdeniau deleted the fix-featureLength branch June 2, 2020 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants