Skip to content

Commit

Permalink
Fix bug with custom link being overwritten by gallery linkTo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Glen Davies committed Apr 11, 2021
1 parent 72e9c2b commit e291f91
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,10 @@ export default function Image( {
setAttributes( {
inheritedAttributes: {
...inheritedAttributes,
linkDestination: props.linkDestination
? false
: inheritedAttributes.linkDestination,
linkDestination:
props.linkDestination || props.href
? false
: inheritedAttributes.linkDestination,
linkTarget:
props.linkTarget || props.linkTarget !== linkTarget
? false
Expand Down

0 comments on commit e291f91

Please sign in to comment.