Skip to content

Commit

Permalink
Remove in/delete
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Jan 4, 2021
1 parent 0969142 commit 588f1c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const GatsbyImageHydrator: FunctionComponent<GatsbyImageProps> = function
as: Type = `div`,
style,
className,
class: preactClass,
onStartLoad,
image,
onLoad: customOnLoad,
Expand All @@ -69,9 +70,8 @@ export const GatsbyImageHydrator: FunctionComponent<GatsbyImageProps> = function
}
return null
}
if (`class` in props) {
className = props.class
delete props.class
if (preactClass) {
className = preactClass
}
const { width, height, layout, images } = image

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const GatsbyImageHydrator: FunctionComponent<{
export const GatsbyImage: FunctionComponent<GatsbyImageProps> = function GatsbyImage({
as,
className,
class: preactClass,
style,
image,
loading = `lazy`,
Expand All @@ -32,9 +33,8 @@ export const GatsbyImage: FunctionComponent<GatsbyImageProps> = function GatsbyI
console.warn(`[gatsby-plugin-image] Missing image prop`)
return null
}
if (`class` in props) {
className = props.class
delete props.class
if (preactClass) {
className = preactClass
}
imgStyle = {
objectFit,
Expand Down

0 comments on commit 588f1c1

Please sign in to comment.