2
0
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:
Matt Zabriskie
2016-06-23 13:59:03 -06:00
parent e97123dc52
commit 7a12f36602
+1 -1
View File
@@ -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') {