Skip to content

Commit

Permalink
External image upload: fix uncaught error
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jul 13, 2021
1 parent e2b5503 commit ea8447d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ export default function Image( {
window
.fetch( url )
.then( ( response ) => response.blob() )
.then( ( blob ) => setExternalBlob( blob ) );
.then( ( blob ) => setExternalBlob( blob ) )
// Do nothing, cannot upload.
.catch( () => {} );
}, [ id, url, isSelected, externalBlob ] );

// Focus the caption after inserting an image from the placeholder. This is
Expand Down

0 comments on commit ea8447d

Please sign in to comment.