Rewrite: ignore m.request deserialize option if extract is passed

This commit is contained in:
Patrik Johnson 2016-08-04 19:19:12 +03:00
parent 0d1c1a3f16
commit 88e7cf5454
4 changed files with 43 additions and 4 deletions

View file

@ -38,7 +38,7 @@ module.exports = function($window) {
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
try {
var response = args.deserialize(args.extract(xhr, args))
var response = (args.extract !== extract) ? args.extract(xhr, args) : args.deserialize(args.extract(xhr, args))
if (xhr.status >= 200 && xhr.status < 300) {
stream(cast(args.type, response))
}