2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-14 18:42:33 +03:00

Adding Canceler parameters config and request (#4711)

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
毛呆
2022-05-16 14:19:46 +08:00
committed by GitHub
parent 24f22b2b0b
commit e762cf77b3
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -49,13 +49,13 @@ function CancelToken(executor) {
return promise;
};
executor(function cancel(message) {
executor(function cancel(message, config, request) {
if (token.reason) {
// Cancellation has already been requested
return;
}
token.reason = new CanceledError(message);
token.reason = new CanceledError(message, config, request);
resolvePromise(token.reason);
});
}