Skip to content

Commit f00c9a3

Browse files
committed
Merge branch 'master' of github.com:victorjonsson/jQuery-Form-Validator
2 parents cf165c3 + 8cc79cf commit f00c9a3

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/modules/file.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,16 @@
5858
reader.readAsDataURL(imgPath);
5959

6060
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);
61+
image.onload = function() {
62+
$(window).trigger('imageValidation', [this]);
63+
successCallback(this);
64+
};
65+
66+
image.onerror= function() {
67+
errCallback();
68+
};
69+
70+
image.src = fileObj.target.result;
7371
};
7472
};
7573

0 commit comments

Comments
 (0)