@tanstack/react-query 4.10.1 → 4.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/build/umd/index.development.js +3 -3
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +10 -4
- package/src/__tests__/useQuery.test.tsx +0 -34
- package/src/__tests__/utils.tsx +6 -4
package/LICENSE
CHANGED
|
@@ -1500,7 +1500,7 @@
|
|
|
1500
1500
|
variables: this.options.variables
|
|
1501
1501
|
}); // Notify cache callback
|
|
1502
1502
|
|
|
1503
|
-
(_this$mutationCache$c = (_this$mutationCache$c2 = this.mutationCache.config).onMutate) == null ? void 0 : _this$mutationCache$c.call(_this$mutationCache$c2, this.state.variables, this);
|
|
1503
|
+
await ((_this$mutationCache$c = (_this$mutationCache$c2 = this.mutationCache.config).onMutate) == null ? void 0 : _this$mutationCache$c.call(_this$mutationCache$c2, this.state.variables, this));
|
|
1504
1504
|
const context = await ((_this$options$onMutat = (_this$options = this.options).onMutate) == null ? void 0 : _this$options$onMutat.call(_this$options, this.state.variables));
|
|
1505
1505
|
|
|
1506
1506
|
if (context !== this.state.context) {
|
|
@@ -1514,7 +1514,7 @@
|
|
|
1514
1514
|
|
|
1515
1515
|
const data = await executeMutation(); // Notify cache callback
|
|
1516
1516
|
|
|
1517
|
-
(_this$mutationCache$c3 = (_this$mutationCache$c4 = this.mutationCache.config).onSuccess) == null ? void 0 : _this$mutationCache$c3.call(_this$mutationCache$c4, data, this.state.variables, this.state.context, this);
|
|
1517
|
+
await ((_this$mutationCache$c3 = (_this$mutationCache$c4 = this.mutationCache.config).onSuccess) == null ? void 0 : _this$mutationCache$c3.call(_this$mutationCache$c4, data, this.state.variables, this.state.context, this));
|
|
1518
1518
|
await ((_this$options$onSucce = (_this$options2 = this.options).onSuccess) == null ? void 0 : _this$options$onSucce.call(_this$options2, data, this.state.variables, this.state.context));
|
|
1519
1519
|
await ((_this$options$onSettl = (_this$options3 = this.options).onSettled) == null ? void 0 : _this$options$onSettl.call(_this$options3, data, null, this.state.variables, this.state.context));
|
|
1520
1520
|
this.dispatch({
|
|
@@ -1527,7 +1527,7 @@
|
|
|
1527
1527
|
var _this$mutationCache$c5, _this$mutationCache$c6, _this$options$onError, _this$options4, _this$options$onSettl2, _this$options5;
|
|
1528
1528
|
|
|
1529
1529
|
// Notify cache callback
|
|
1530
|
-
(_this$mutationCache$c5 = (_this$mutationCache$c6 = this.mutationCache.config).onError) == null ? void 0 : _this$mutationCache$c5.call(_this$mutationCache$c6, error, this.state.variables, this.state.context, this);
|
|
1530
|
+
await ((_this$mutationCache$c5 = (_this$mutationCache$c6 = this.mutationCache.config).onError) == null ? void 0 : _this$mutationCache$c5.call(_this$mutationCache$c6, error, this.state.variables, this.state.context, this));
|
|
1531
1531
|
|
|
1532
1532
|
if ("development" !== 'production') {
|
|
1533
1533
|
this.logger.error(error);
|