We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dad5c35 commit 294e51fCopy full SHA for 294e51f
src/ref.ts
@@ -30,8 +30,12 @@ export function supportRef(nodeOrComponent: any): boolean {
30
return false;
31
}
32
33
- // Function component
34
- if (typeof nodeOrComponent === 'function' && !nodeOrComponent.prototype.render) {
+ // Class component
+ if (
35
+ typeof nodeOrComponent === 'function' &&
36
+ nodeOrComponent.prototype &&
37
+ !nodeOrComponent.prototype.render
38
+ ) {
39
40
41
0 commit comments