Skip to content

Conversation

jessarcher
Copy link
Member

Components that destructure the className prop need to specify a default empty string. Otherwise, if the consuming component does not provide a className, the value will be undefined. When the className is cast to a string in the template, JavaScript will insert a literal string "undefined" as a class name.

@taylorotwell taylorotwell merged commit 6b1d0eb into 1.x Mar 8, 2023
@taylorotwell taylorotwell deleted the fix-undefined-class branch March 8, 2023 15:08
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