diff --git a/packages/components/avatar/src/use-avatar.ts b/packages/components/avatar/src/use-avatar.ts index e7f2b93757..4682c65be6 100644 --- a/packages/components/avatar/src/use-avatar.ts +++ b/packages/components/avatar/src/use-avatar.ts @@ -124,6 +124,7 @@ export function useAvatar(originalProps: UseAvatarProps = {}) { imgProps, className, onError, + disableAnimation: disableAnimationProp, ...otherProps } = originalProps; @@ -134,8 +135,7 @@ export function useAvatar(originalProps: UseAvatarProps = {}) { const {isFocusVisible, isFocused, focusProps} = useFocusRing(); const {isHovered, hoverProps} = useHover({isDisabled}); - const disableAnimation = - originalProps.disableAnimation ?? globalContext?.disableAnimation ?? false; + const disableAnimation = disableAnimationProp ?? globalContext?.disableAnimation ?? false; const imageStatus = useImage({src, onError, ignoreFallback});