]> source.dussan.org Git - jquery.git/commitdiff
Alternate fix for #11426; check responseText. Close gh-843.
authorOleg Gaidarenko <markelog@gmail.com>
Sun, 21 Oct 2012 01:24:07 +0000 (21:24 -0400)
committerDave Methvin <dave.methvin@gmail.com>
Sun, 21 Oct 2012 01:25:39 +0000 (21:25 -0400)
src/ajax/xhr.js

index a24feaf1a006cd47b80a23a4cf66cfc8d5efcce7..d3422ec7916f5f1e0276822c551826ecbe5c37a2 100644 (file)
@@ -148,9 +148,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( err ) {
                                                                        }
 
                                                                        // Firefox throws an exception when accessing