Skip to content

AddContent: Replace div with fragment #584

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

Merged
merged 1 commit into from
Dec 19, 2018
Merged

AddContent: Replace div with fragment #584

merged 1 commit into from
Dec 19, 2018

Conversation

martinfrances107
Copy link
Contributor

Issue

#555

The parent issue identifier that typescript files were not being linted. Another PR rename files containing typescript to AddContent.test.js and AddContent.test.jsx

This PR now fixes one of the outstanding lint errors

Markup is wrapped in a ListItemText element and so as we sanitize it is inappropriate to use Markup's default of a div as an internal wrapper.

#555 (comment)

Here is the lint warning

Warning: validateDOMNesting(...): cannot appear as a descendant of

.

looking at the valid values for tagName in Markup -- "span" or "fragment" are the only possibilities

fragment has the advantage of dissolving into nothing.

@dawehner dawehner merged commit 281400d into jsdrupal:master Dec 19, 2018
@martinfrances107
Copy link
Contributor Author

Thank you both

@martinfrances107 martinfrances107 deleted the replaceDivWithFragment branch December 19, 2018 18:51
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.

3 participants