Skip to content

Commit 3ae93ea

Browse files
committed
Return the correctly formed canceller
1 parent f3bdc05 commit 3ae93ea

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/Network/HTTP/Affjax.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,13 @@ exports._ajax = function () {
7474
xhr.withCredentials = options.withCredentials;
7575
xhr.send(options.content);
7676

77-
return function (/* error */) {
78-
return function (cancelErrback, cancelCallback) {
79-
try {
80-
xhr.abort();
81-
} catch (e) {
82-
return cancelErrback(e);
83-
}
84-
return cancelCallback();
85-
};
77+
return function (error, cancelErrback, cancelCallback) {
78+
try {
79+
xhr.abort();
80+
} catch (e) {
81+
return cancelErrback(e);
82+
}
83+
return cancelCallback();
8684
};
8785
};
8886
};

0 commit comments

Comments
 (0)