We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cf165c3 + 8cc79cf commit f00c9a3Copy full SHA for f00c9a3
src/modules/file.js
@@ -58,18 +58,16 @@
58
reader.readAsDataURL(imgPath);
59
60
reader.onload = function(fileObj) {
61
- setTimeout(function() {
62
- image.onload = function() {
63
- $(window).trigger('imageValidation', [this]);
64
- successCallback(this);
65
- };
66
-
67
- image.onerror= function() {
68
- errCallback();
69
70
71
- image.src = fileObj.target.result;
72
- }, 2000);
+ image.onload = function() {
+ $(window).trigger('imageValidation', [this]);
+ successCallback(this);
+ };
+
+ image.onerror= function() {
+ errCallback();
+ image.src = fileObj.target.result;
73
};
74
75
0 commit comments