mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Fix - Request ignores false, 0 and empty string as body values (#4785)
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
+2
-1
@@ -205,7 +205,8 @@ module.exports = function xhrAdapter(config) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!requestData) {
|
// false, 0 (zero number), and '' (empty string) are valid JSON values
|
||||||
|
if (!requestData && requestData !== false && requestData !== 0 && requestData !== '') {
|
||||||
requestData = null;
|
requestData = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user