Skip to content

Commit

Permalink
Warning error (Foliotek#623)
Browse files Browse the repository at this point in the history
Added a minor check to alert user that they loaded Croppie without an image.
  • Loading branch information
michael-letcher authored and thedustinsmith committed May 24, 2019
1 parent 5142170 commit 8986e13
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions croppie.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@

/* Utilities */
function loadImage(src, doExif) {
if (!src) { throw 'Source image missing'; }

var img = new Image();
img.style.opacity = '0';
return new Promise(function (resolve, reject) {
Expand Down

0 comments on commit 8986e13

Please sign in to comment.