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: page crashes if Tabs has single Tab child #972

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

chenjiahan
Copy link
Member

Summary

Fix page crashes if Tabs has single Tab child.

Related Issue

#971

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link

netlify bot commented Apr 18, 2024

Deploy Preview for aquamarine-blini-95325f ready!

Name Link
🔨 Latest commit ee90a5e
🔍 Latest deploy log https://app.netlify.com/sites/aquamarine-blini-95325f/deploys/66208f7e54c77000086c944b
😎 Deploy Preview https://deploy-preview-972--aquamarine-blini-95325f.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 93 (🟢 up 11 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@chenjiahan chenjiahan requested a review from Timeless0911 April 18, 2024 03:12
@Timeless0911
Copy link
Contributor

If we write like this

<Tabs tabContainerClassName="tabs-b">
  <Tab label="label2">content2</Tab>
  <Tab label="label3">content3</Tab>
</Tabs>

It contains a newline character in the middle of two <Tab>

image

We should filter the children array to remove the '\n' element

@Timeless0911 Timeless0911 merged commit 0e766da into main Apr 18, 2024
9 checks passed
@Timeless0911 Timeless0911 deleted the tabs_children_0418 branch April 18, 2024 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants