Skip to content

Commit

Permalink
apply React 19 IdealImage retrocompat fix
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Dec 13, 2024
1 parent 37aad9f commit b7078d7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ export default function IdealImage(props: Props): ReactNode {

return (
<ReactIdealImage
// @ts-expect-error: quick fix for React >= 19 not applying defaultProps
icons={ReactIdealImage.defaultProps.icons}
// @ts-expect-error: quick fix for React >= 19 not applying defaultProps
theme={ReactIdealImage.defaultProps.theme}
{...propsRest}
height={img.src.height ?? 100}
width={img.src.width ?? 100}
Expand Down

0 comments on commit b7078d7

Please sign in to comment.