(reason)
| 14 | let aborted = false; |
| 15 | |
| 16 | const onabort = function (reason) { |
| 17 | if (!aborted) { |
| 18 | aborted = true; |
| 19 | unsubscribe(); |
| 20 | const err = reason instanceof Error ? reason : this.reason; |
| 21 | controller.abort( |
| 22 | err instanceof AxiosError |
| 23 | ? err |
| 24 | : new CanceledError(err instanceof Error ? err.message : err) |
| 25 | ); |
| 26 | } |
| 27 | }; |
| 28 | |
| 29 | let timer = |
| 30 | timeout && |
no test coverage detected