Skip to content

Commit af30614

Browse files
committed
jsLint changes broke file progress
1 parent f7e190e commit af30614

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

js/jquery.fileupload-apc.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,15 @@
8686
data: { "apc" : true, "apccode" : options.apccode }
8787
}).done(function(o) {
8888
// Set the apc_data progress.
89-
var r = $.parseJSON(o), e = $.Event('progress', {
90-
lengthComputable: true,
91-
loaded: r.current,
92-
total: r.total
93-
}), now = (new Date()).getTime(), loaded = Math.floor(r.current);
89+
var r = $.parseJSON(o), e = false, now = false;
9490
if (r) {
9591
r = r.apc_data;
92+
e = $.Event('progress', {
93+
lengthComputable: true,
94+
loaded: r.current,
95+
total: r.total
96+
});
97+
now = (new Date()).getTime(), loaded = Math.floor(r.current);
9698
// Add the difference from the previously loaded state
9799
// to the global loaded counter:
98100
self._progress.total = r.total;

0 commit comments

Comments
 (0)