File tree 3 files changed +7
-7
lines changed
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -69,12 +69,12 @@ export default function attributesToProps(
69
69
70
70
// convert attribute to uncontrolled component prop (e.g., `value` to `defaultValue`)
71
71
if (
72
- UNCONTROLLED_COMPONENT_ATTRIBUTES . indexOf (
72
+ UNCONTROLLED_COMPONENT_ATTRIBUTES . includes (
73
73
propName as UncontrolledComponentAttributes ,
74
- ) !== - 1 &&
75
- UNCONTROLLED_COMPONENT_NAMES . indexOf (
74
+ ) &&
75
+ UNCONTROLLED_COMPONENT_NAMES . includes (
76
76
nodeName ! as UncontrolledComponentNames ,
77
- ) !== - 1 &&
77
+ ) &&
78
78
! isInputValueOnly
79
79
) {
80
80
propName = getPropName ( 'default' + attributeNameLowerCased ) ;
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ export default function domToReact(
95
95
props = attributesToProps ( element . attribs , element . name ) ;
96
96
}
97
97
98
- let children ;
98
+ let children : ReturnType < typeof domToReact > | undefined ;
99
99
100
100
switch ( node . type ) {
101
101
case 'script' :
Original file line number Diff line number Diff line change @@ -29,9 +29,9 @@ type ReservedSvgMathmlElements =
29
29
*/
30
30
export function isCustomComponent (
31
31
tagName : string ,
32
- props ?: Record < PropertyKey , any > ,
32
+ props ?: Record < PropertyKey , string > ,
33
33
) : boolean {
34
- if ( tagName . indexOf ( '-' ) === - 1 ) {
34
+ if ( ! tagName . includes ( '-' ) ) {
35
35
return Boolean ( props && typeof props . is === 'string' ) ;
36
36
}
37
37
You can’t perform that action at this time.
0 commit comments