mirror of
https://github.com/tenrok/axios.git
synced 2026-06-05 16:42:32 +03:00
Only use if it's a function
This commit is contained in:
+1
-1
@@ -143,7 +143,7 @@ module.exports = function xhrAdapter(resolve, reject, config) {
|
||||
}
|
||||
|
||||
// Handle progress if needed
|
||||
if (config.progress) {
|
||||
if (typeof config.progress === 'function') {
|
||||
if (config.method === 'post' || config.method === 'put') {
|
||||
request.upload.addEventListener('progress', config.progress);
|
||||
} else if (config.method === 'get') {
|
||||
|
||||
Reference in New Issue
Block a user