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(getInteractiveContent): add null checks #12789

Conversation

tay1orjones
Copy link
Member

Based on some conversations with @fbarroso24: When using react-test-renderer to test components using this hook/function, the component will error with

TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))

This PR adds some null checks to avoid iterating over non-iterable Symbols passed to this function stemming from the react-test-renderer environment.

Changelog

Changed

  • modify getInteractiveContent to include null checks

Testing / Reviewing

  • Check to make sure Popover, Tooltip, IconButton stories are not be impacted and work as intended
  • @fbarroso24 has already tested this fix locally to ensure it fixes the issue he's reported

@tay1orjones tay1orjones requested a review from a team as a code owner December 6, 2022 14:01
@tay1orjones tay1orjones self-assigned this Dec 6, 2022
Copy link

@fbarroso24 fbarroso24 left a comment

Choose a reason for hiding this comment

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

Thanks @tay1orjones!

@netlify
Copy link

netlify bot commented Dec 6, 2022

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 363c7ff
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/638f67909dcd410008d6753f
😎 Deploy Preview https://deploy-preview-12789--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@netlify
Copy link

netlify bot commented Dec 6, 2022

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 363c7ff
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/638f67907020d000097ba2d5
😎 Deploy Preview https://deploy-preview-12789--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link
Collaborator

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

LGTM 👍 ✅

@kodiakhq kodiakhq bot merged commit 5208b5f into carbon-design-system:main Dec 6, 2022
@alisonjoseph alisonjoseph added this to the 2022 Q4 milestone Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants