Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Different way to fix #11426 #843

Closed
wants to merge 1 commit into from

2 participants

@markelog
Collaborator

Fix for #11426 good enough as it is, just want you to show a different way to do it

@dmethvin
Owner

Do we have a way to unit test this?

Collaborator

You already have test for it, see original fix – jquery@484cea1

@dmethvin dmethvin closed this in cafb542
@dmethvin
Owner

No more try-catch! Thanks @orkel!

@mescoda mescoda referenced this pull request from a commit in mescoda/jquery
@markelog markelog Alternate fix for #11426; check responseText. Close gh-843. c2d5da2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 29, 2012
  1. @markelog

    Different way to fix #11426

    markelog authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 2 deletions.
  1. +1 −2  src/ajax/xhr.js
View
3  src/ajax/xhr.js
@@ -149,9 +149,8 @@ if ( jQuery.support.ajax ) {
// When requesting binary data, IE6-9 will throw an exception
// on any attempt to access responseText (#11426)
- try {
+ if ( typeof xhr.responseText === "string" ) {
responses.text = xhr.responseText;
- } catch( _ ) {
}
// Firefox throws an exception when accessing
Something went wrong with that request. Please try again.