fix: 204无内容直接返回判断 (#539)

This commit is contained in:
liweijie0812 2023-06-02 16:03:02 +08:00 committed by GitHub
parent 4555545562
commit 83939b7517
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ const transform: AxiosTransform = {
// 如果204无内容直接返回 // 如果204无内容直接返回
const method = res.config.method?.toLowerCase(); const method = res.config.method?.toLowerCase();
if (res.status === 204 || method === 'put' || method === 'patch') { if (res.status === 204 && ['put', 'patch', 'delete'].includes(method)) {
return res; return res;
} }