axios-hooks
Advanced tools
Comparing version 1.10.1-1 to 1.10.1-2
@@ -5,2 +5,9 @@ # Changelog | ||
### [1.10.1-2](https://github.com/simoneb/axios-hooks/compare/v1.10.1-1...v1.10.1-2) (2020-06-20) | ||
### Bug Fixes | ||
* **250:** more robust cancellation approach ([c81feac](https://github.com/simoneb/axios-hooks/commit/c81feacf5e6c0e90e3126ef4c8c07968987d956b)) | ||
### [1.10.1-1](https://github.com/simoneb/axios-hooks/compare/v1.10.1-0...v1.10.1-1) (2020-06-20) | ||
@@ -7,0 +14,0 @@ |
@@ -278,5 +278,5 @@ "use strict"; | ||
_react["default"].useEffect(function () { | ||
cancelSourceRef.current = _axios["default"].CancelToken.source(); | ||
if (!options.manual) { | ||
cancelSourceRef.current.cancel(); | ||
cancelSourceRef.current = _axios["default"].CancelToken.source(); | ||
executeRequest((0, _extends3["default"])({ | ||
@@ -283,0 +283,0 @@ cancelToken: cancelSourceRef.current.token |
@@ -257,5 +257,5 @@ import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
React.useEffect(function () { | ||
cancelSourceRef.current = StaticAxios.CancelToken.source(); | ||
if (!options.manual) { | ||
cancelSourceRef.current.cancel(); | ||
cancelSourceRef.current = StaticAxios.CancelToken.source(); | ||
executeRequest(_extends({ | ||
@@ -262,0 +262,0 @@ cancelToken: cancelSourceRef.current.token |
{ | ||
"name": "axios-hooks", | ||
"version": "1.10.1-1", | ||
"version": "1.10.1-2", | ||
"description": "axios-hooks", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -174,5 +174,6 @@ import React from 'react' | ||
React.useEffect(() => { | ||
cancelSourceRef.current = StaticAxios.CancelToken.source() | ||
if (!options.manual) { | ||
cancelSourceRef.current.cancel() | ||
cancelSourceRef.current = StaticAxios.CancelToken.source() | ||
if (!options.manual) { | ||
executeRequest( | ||
@@ -179,0 +180,0 @@ { cancelToken: cancelSourceRef.current.token, ...config }, |
45582
701