@@ -28,7 +28,7 @@ class PropsProxyHandler implements ProxyHandler<any> {
2828 if ( prop === 'children' ) {
2929 value = this . owner . children ;
3030 } else {
31- if ( typeof prop === 'string' ) {
31+ if ( typeof prop === 'string' && typeof this . owner . type === 'string' ) {
3232 const attr = jsxEventToHtmlAttribute ( prop as string ) ;
3333 if ( attr ) {
3434 prop = attr ;
@@ -48,7 +48,7 @@ class PropsProxyHandler implements ProxyHandler<any> {
4848 } else if ( prop === 'children' ) {
4949 this . owner . children = value ;
5050 } else {
51- if ( typeof prop === 'string' ) {
51+ if ( typeof prop === 'string' && typeof this . owner . type === 'string' ) {
5252 const attr = jsxEventToHtmlAttribute ( prop as string ) ;
5353 if ( attr ) {
5454 prop = attr ;
@@ -90,7 +90,7 @@ class PropsProxyHandler implements ProxyHandler<any> {
9090 } else if ( prop === _CONST_PROPS || prop === _VAR_PROPS ) {
9191 return true ;
9292 }
93- if ( typeof prop === 'string' ) {
93+ if ( typeof prop === 'string' && typeof this . owner . type === 'string' ) {
9494 const attr = jsxEventToHtmlAttribute ( prop as string ) ;
9595 if ( attr ) {
9696 prop = attr ;
@@ -133,6 +133,8 @@ class PropsProxyHandler implements ProxyHandler<any> {
133133/**
134134 * Instead of using PropsProxyHandler getter (which could create a component-level subscription).
135135 * Use this function to get the props directly from a const or var props.
136+ *
137+ * This does not convert jsx event names.
136138 */
137139export const directGetPropsProxyProp = < T , JSX > ( jsx : JSXNodeInternal < JSX > , prop : string ) : T => {
138140 return (
0 commit comments