Skip to content

Commit

Permalink
Merge pull request #11956 from mollfpr/fix-growl-error-on-paste-text
Browse files Browse the repository at this point in the history
Fix growl error on paste text
  • Loading branch information
NikkiWines authored Oct 18, 2022
2 parents cecebd3 + 088bea1 commit a93858c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Composer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class Composer extends React.Component {
const embeddedImages = domparser.parseFromString(pastedHTML, TEXT_HTML).images;

// If HTML has img tag, then fetch images from it.
if (embeddedImages.length > 0) {
if (embeddedImages.length > 0 && embeddedImages[0].src) {
fetch(embeddedImages[0].src)
.then((response) => {
if (!response.ok) { throw Error(response.statusText); }
Expand Down

0 comments on commit a93858c

Please sign in to comment.