Skip to content

Commit

Permalink
Image Block: properly show errors on drag n drop (#25004)
Browse files Browse the repository at this point in the history
Co-authored-by: cpap <[email protected]>
  • Loading branch information
cpapazoglou and cpap authored Sep 3, 2020
1 parent 7ee00ad commit 6a190cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/block-library/src/image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ export function ImageEdit( {
allowedTypes: ALLOWED_MEDIA_TYPES,
onError: ( message ) => {
noticeOperations.createErrorNotice( message );
setAttributes( {
src: undefined,
id: undefined,
url: undefined,
} );
},
} );
}
Expand Down

0 comments on commit 6a190cd

Please sign in to comment.