File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,6 @@ var CommentProvider = (function () {
4848 uri += argsArray . join ( '&' ) ;
4949 }
5050
51- xhr . responseType = typeof responseType === "string" ?
52- responseType : "" ;
5351 xhr . onload = function ( ) {
5452 if ( this . status >= 200 && this . status < 300 ) {
5553 resolve ( this . response ) ;
@@ -63,6 +61,13 @@ var CommentProvider = (function () {
6361 } ;
6462
6563 xhr . open ( method , uri ) ;
64+
65+ // Change response type before open() will cause InvalidStateError in IE11.
66+ // The error is documented here:
67+ // https://connect.microsoft.com/IE/feedback/details/795580/ie11-xmlhttprequest-incorrectly-throws-invalidstateerror-when-setting-responsetype
68+ xhr . responseType = typeof responseType === "string" ?
69+ responseType : "" ;
70+
6671 if ( typeof body !== 'undefined' ) {
6772 xhr . send ( body ) ;
6873 } else {
You can’t perform that action at this time.
0 commit comments