File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,7 +109,10 @@ UHR.prototype._doRequest = function (parameters) {
109109 requestError = new Error ( xhr . statusText || ERROR_CONNECTION ) ;
110110 reject ( requestError ) ;
111111 } ;
112- xhr . onloadend = function ( ) {
112+ xhr . onreadystatechange = function ( ) {
113+ if ( xhr . readyState !== 4 ) {
114+ return ;
115+ }
113116 if ( requestError ) {
114117 return ;
115118 }
@@ -180,8 +183,9 @@ function getStatusObject(xhr) {
180183 } ) ;
181184
182185 return {
183- code : xhr . status ,
184- text : xhr . statusText ,
186+ // handle IE9 bug: http://goo.gl/idspSr
187+ code : xhr . status === 1223 ? 204 : xhr . status ,
188+ text : xhr . status === 1223 ? 'No Content' : xhr . statusText ,
185189 headers : headers
186190 } ;
187191}
Original file line number Diff line number Diff line change 11{
22 "name" : " catberry-uhr" ,
3- "version" : " 4.1.1 " ,
3+ "version" : " 4.2.0 " ,
44 "author" : " Denis Rechkunov <denis.rechkunov@gmail.com>" ,
55 "description" : " Universal HTTP(S) Request module for catberry framework" ,
66 "homepage" : " https://github.com/catberry/catberry-uhr" ,
You can’t perform that action at this time.
0 commit comments