From e59d11c93cf2bd394b83874e759d67c5fddfcf57 Mon Sep 17 00:00:00 2001 From: Sebastian Tschan Date: Wed, 29 Jun 2011 01:01:11 +0900 Subject: [PATCH] Better fail/done arguments detection for the always callback. --- jquery.fileupload.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jquery.fileupload.js b/jquery.fileupload.js index 1e3c6bf97..d721592b8 100644 --- a/jquery.fileupload.js +++ b/jquery.fileupload.js @@ -1,5 +1,5 @@ /* - * jQuery File Upload Plugin 5.0.2 + * jQuery File Upload Plugin 5.0.3 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2010, Sebastian Tschan @@ -484,10 +484,10 @@ }).fail(function (jqXHR, textStatus, errorThrown) { that._onFail(jqXHR, textStatus, errorThrown, options); }).always(function (a1, a2, a3) { - if (!a3 || typeof a3 === 'string') { - that._onAlways(undefined, a2, a1, a3, options); - } else { + if (a3 && a3.done) { that._onAlways(a1, a2, a3, undefined, options); + } else { + that._onAlways(undefined, a2, a1, a3, options); } }); return jqXHR;