Skip to content

Commit

Permalink
fix: should only trigger start handler once
Browse files Browse the repository at this point in the history
Closes #306
  • Loading branch information
fengyuanchen committed Feb 27, 2018
1 parent 33991a9 commit c66d13b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/cropper.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ class Cropper {
if (element.complete) {
this.timeout = setTimeout(start, 0);
} else {
addListener(element, EVENT_LOAD, start);
addListener(element, EVENT_LOAD, start, {
once: true,
});
}
} else {
image.onload = start;
Expand Down

0 comments on commit c66d13b

Please sign in to comment.