File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 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(
6969
7070 // convert attribute to uncontrolled component prop (e.g., `value` to `defaultValue`)
7171 if (
72- UNCONTROLLED_COMPONENT_ATTRIBUTES . indexOf (
72+ UNCONTROLLED_COMPONENT_ATTRIBUTES . includes (
7373 propName as UncontrolledComponentAttributes ,
74- ) !== - 1 &&
75- UNCONTROLLED_COMPONENT_NAMES . indexOf (
74+ ) &&
75+ UNCONTROLLED_COMPONENT_NAMES . includes (
7676 nodeName ! as UncontrolledComponentNames ,
77- ) !== - 1 &&
77+ ) &&
7878 ! isInputValueOnly
7979 ) {
8080 propName = getPropName ( 'default' + attributeNameLowerCased ) ;
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ export default function domToReact(
9595 props = attributesToProps ( element . attribs , element . name ) ;
9696 }
9797
98- let children ;
98+ let children : ReturnType < typeof domToReact > | undefined ;
9999
100100 switch ( node . type ) {
101101 case 'script' :
Original file line number Diff line number Diff line change @@ -29,9 +29,9 @@ type ReservedSvgMathmlElements =
2929 */
3030export function isCustomComponent (
3131 tagName : string ,
32- props ?: Record < PropertyKey , any > ,
32+ props ?: Record < PropertyKey , string > ,
3333) : boolean {
34- if ( tagName . indexOf ( '-' ) === - 1 ) {
34+ if ( ! tagName . includes ( '-' ) ) {
3535 return Boolean ( props && typeof props . is === 'string' ) ;
3636 }
3737
You can’t perform that action at this time.
0 commit comments