修复204时response的异常
parent
6a7099ad2e
commit
dec149ef0f
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@bytedo/fetch",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"description": "全新的ajax封装。分2个版本, 一个基于XMLHttpRequest, 一个基于window.fetch",
|
||||
"main": "dist/index.js",
|
||||
"directories": {
|
||||
|
|
|
@ -276,7 +276,7 @@ class _Request {
|
|||
result.statusText = this.xhr.statusText || ERRORS[10500]
|
||||
}
|
||||
|
||||
result.body = this.xhr.response
|
||||
result.body = result.status === 204 ? null : this.xhr.response
|
||||
|
||||
this.__success__(isSucc, result)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue