cozy-client 32.2.3 → 32.2.6

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.
@@ -2550,7 +2550,7 @@ var CozyClient = /*#__PURE__*/function () {
2550
2550
  CozyClient.hooks = CozyClient.hooks || {};
2551
2551
  CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
2552
2552
 
2553
- CozyClient.version = "32.2.3";
2553
+ CozyClient.version = "32.2.6";
2554
2554
 
2555
2555
  _microee.default.mixin(CozyClient);
2556
2556
 
@@ -489,14 +489,14 @@ Object {
489
489
  "skip": undefined,
490
490
  "sort": undefined,
491
491
  },
492
- "fetchStatus": "pending",
492
+ "fetchStatus": "loaded",
493
493
  "fetchedPagesCount": 0,
494
494
  "hasMore": false,
495
495
  "id": "b",
496
496
  "lastError": null,
497
497
  "lastErrorUpdate": null,
498
- "lastFetch": null,
499
- "lastUpdate": null,
498
+ "lastFetch": 1337,
499
+ "lastUpdate": 1337,
500
500
  "options": null,
501
501
  },
502
502
  }
@@ -205,10 +205,16 @@ var query = function query() {
205
205
 
206
206
  case RECEIVE_QUERY_RESULT:
207
207
  {
208
- var response = action.response;
208
+ var response = action.response; // Data can be null when we get a 404 not found
209
+ // see Collection.get()
210
+ // but we still need to update the fetchStatus.
209
211
 
210
212
  if (!response.data) {
211
- return state;
213
+ return _objectSpread(_objectSpread({}, state), {}, {
214
+ fetchStatus: 'loaded',
215
+ lastFetch: Date.now(),
216
+ lastUpdate: Date.now()
217
+ });
212
218
  }
213
219
  /** @type {Partial<QueryState>} */
214
220
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-client",
3
- "version": "32.2.3",
3
+ "version": "32.2.6",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.node.js",
6
6
  "browser": "dist/index.js",
@@ -18,7 +18,7 @@
18
18
  "@types/jest": "^26.0.20",
19
19
  "@types/lodash": "^4.14.170",
20
20
  "btoa": "^1.2.1",
21
- "cozy-stack-client": "^32.2.3",
21
+ "cozy-stack-client": "^32.2.5",
22
22
  "json-stable-stringify": "^1.0.1",
23
23
  "lodash": "^4.17.13",
24
24
  "microee": "^0.0.6",
@@ -73,5 +73,5 @@
73
73
  "react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
74
74
  },
75
75
  "sideEffects": false,
76
- "gitHead": "6e76d09f9cf708aab640d4a2d4883c5b8119459a"
76
+ "gitHead": "2bdb42a6c99bc5383e753c4188090f55ea0ffd08"
77
77
  }