Fix request abort error

This commit is contained in:
Magnus Leo 2017-01-13 09:29:28 +01:00
parent 5ac3bb14cf
commit bfccd1b6bf

View file

@ -70,7 +70,7 @@ module.exports = function($window, Promise) {
if (typeof args.config === "function") xhr = args.config(xhr, args) || xhr
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
if (xhr.status && xhr.readyState === 4) {
try {
var response = (args.extract !== extract) ? args.extract(xhr, args) : args.deserialize(args.extract(xhr, args))
if ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304) {