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: remove console error #18217

Merged
merged 1 commit into from
Oct 26, 2023
Merged

fix: remove console error #18217

merged 1 commit into from
Oct 26, 2023

Conversation

daibhin
Copy link
Contributor

@daibhin daibhin commented Oct 26, 2023

Problem

No key on mapped items

Changes

Wrap in a div and add a key

How did you test this code?

Visually (does not affect layout)

@@ -37,10 +37,10 @@ export function FeaturePreviewsModal({
return false
}
return (
<>
<div key={feature.flagKey}>
Copy link
Contributor

Choose a reason for hiding this comment

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

You can also do this with <React.Fragment key={...}> just fyi

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah nice, never knew!

@daibhin daibhin merged commit 127b409 into master Oct 26, 2023
74 checks passed
@daibhin daibhin deleted the dn-fix/remove-console-error branch October 26, 2023 16:25
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.

2 participants