Skip to content

Commit

Permalink
Fix ajax to always expect an Error object, per #10646.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmethvin committed Nov 8, 2011
1 parent f8eba6e commit 586fb05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ajax.js
Expand Up @@ -752,10 +752,10 @@ jQuery.extend({
} catch (e) {
// Propagate exception as error if not done
if ( state < 2 ) {
done( -1, e );
done( -1, e.message );
// Simply rethrow otherwise
} else {
jQuery.error( e );
jQuery.error( e.message );
}
}
}
Expand Down

0 comments on commit 586fb05

Please sign in to comment.