From 30d18f1291665e89d070e6e540f7ce3782d1cf03 Mon Sep 17 00:00:00 2001 From: Rahul Kadyan Date: Sun, 17 Jan 2016 16:20:41 +0530 Subject: [PATCH] Extend xhr object with deep copy. This allow to tap into upload.* events too. ```js $http.get('/blah', null, null, {xhr: {upload: {onprogress: function(event) { return true}}}}); ``` --- src/http/client/xhr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/client/xhr.js b/src/http/client/xhr.js index 24c86131..421da69a 100644 --- a/src/http/client/xhr.js +++ b/src/http/client/xhr.js @@ -17,7 +17,7 @@ module.exports = function (request) { xhr.open(request.method, _.url(request), true); if (_.isPlainObject(request.xhr)) { - _.extend(xhr, request.xhr); + _.extend(true, xhr, request.xhr); } _.each(request.headers || {}, function (value, header) {