mirror of
https://github.com/jquery/jquery.git
synced 2026-02-07 13:55:34 -05:00
Take 2 on "Fix ajax to always expect an Error object, per #10646."
We can't use jQuery.error to rethrow anymore since it constructs a new Error from its supposedly-string arg. Also, older IE stringifies Error objects into "[object Error]" so I've loosened the unit test criteria.
This reverts commit 586fb05919.
This commit is contained in:
@@ -752,10 +752,10 @@ jQuery.extend({
|
||||
} catch (e) {
|
||||
// Propagate exception as error if not done
|
||||
if ( state < 2 ) {
|
||||
done( -1, e.message );
|
||||
done( -1, e );
|
||||
// Simply rethrow otherwise
|
||||
} else {
|
||||
jQuery.error( e.message );
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user