Skip to content

Commit

Permalink
stricter HTMLElementType
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored and oliviertassinari committed Aug 31, 2020
1 parent 1fb6ae1 commit 4a699c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/material-ui-utils/src/HTMLElementType.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export default function HTMLElementType(
props: { [key: string]: any },
props: { [key: string]: unknown },
propName: string,
componentName: string,
location: string,
propFullName: string,
) {
): Error | null {
if (process.env.NODE_ENV === 'production') {
return null;
}
Expand All @@ -16,7 +16,7 @@ export default function HTMLElementType(
return null;
}

if (propValue && propValue.nodeType !== 1) {
if (propValue && (propValue as any).nodeType !== 1) {
return new Error(
`Invalid ${location} \`${safePropName}\` supplied to \`${componentName}\`. ` +
`Expected an HTMLElement.`,
Expand Down

0 comments on commit 4a699c0

Please sign in to comment.