[OutlinedInput] ownerState
can be undefined
momentarily
#32710
Labels
bug 馃悰
Something doesn't work
duplicate
This issue or pull request already exists
package: system
Specific to @mui/system
Duplicates
Latest version
Current behavior 馃槸
Get
Cannot read properties of undefined
errorExpected behavior 馃
The default value of ownerState should be empty object
{}
. Or change the type of ownerState to be optionalSteps to reproduce 馃暪
Steps:
Context 馃敠
Im using no-unnecessary-condition eslint rule to check if I should use optional chaining (?.)
And because the type of ownerState is non-undefined, eslint tell me to not use optional chaining (?.)
But when I remove
?.
, I gotCannot read properties of undefined
error.Your environment 馃寧
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: