@@ -353,8 +353,10 @@ function tastyElement<K extends StyleList, V extends VariantMap>(
353353
354354 for ( const prop of propsToCheck ) {
355355 const key = prop as unknown as string ;
356- if ( Object . prototype . hasOwnProperty . call ( otherProps as object , key ) ) {
357- if ( ! propStyles ) propStyles = { } ;
356+
357+ if ( ! propStyles ) propStyles = { } ;
358+
359+ if ( key in otherProps ) {
358360 ( propStyles as any ) [ key ] = ( otherProps as any ) [ key ] ;
359361 delete ( otherProps as any ) [ key ] ;
360362 }
@@ -376,6 +378,8 @@ function tastyElement<K extends StyleList, V extends VariantMap>(
376378 [ breakpoints ?. join ( ',' ) ] ,
377379 ) ;
378380
381+ const propStylesKey = stringifyStyles ( propStyles ) ;
382+
379383 // Optimize style computation and cache key generation
380384 const { allStyles, cacheKey, useDefaultStyles } = useMemo ( ( ) => {
381385 const hasStyles =
@@ -399,7 +403,7 @@ function tastyElement<K extends StyleList, V extends VariantMap>(
399403 cacheKey : key ,
400404 useDefaultStyles : useDefault ,
401405 } ;
402- } , [ styles , propStyles , breakpointsKey ] ) ;
406+ } , [ styles , propStylesKey , breakpointsKey ] ) ;
403407
404408 // Compute rules synchronously; inject via insertion effect
405409 const directResult : RenderResult = useMemo ( ( ) => {
0 commit comments