cozy-client 58.1.0 → 58.2.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.
Files changed (2) hide show
  1. package/dist/CozyClient.js +15 -5
  2. package/package.json +2 -2
@@ -1630,7 +1630,7 @@ var CozyClient = /*#__PURE__*/function () {
1630
1630
  key: "requestQuery",
1631
1631
  value: function () {
1632
1632
  var _requestQuery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(definition, options) {
1633
- var mainResponse, withIncluded;
1633
+ var mainResponse, schema, withIncluded;
1634
1634
  return _regenerator.default.wrap(function _callee11$(_context11) {
1635
1635
  while (1) {
1636
1636
  switch (_context11.prev = _context11.next) {
@@ -1652,14 +1652,24 @@ var CozyClient = /*#__PURE__*/function () {
1652
1652
  return _context11.abrupt("return", mainResponse);
1653
1653
 
1654
1654
  case 7:
1655
- _context11.next = 9;
1655
+ schema = this.schema.getDoctypeSchema(definition.doctype);
1656
+
1657
+ if (!schema.relationships) {
1658
+ _context11.next = 13;
1659
+ break;
1660
+ }
1661
+
1662
+ _context11.next = 11;
1656
1663
  return this.fetchRelationships(mainResponse, this.getIncludesRelationships(definition));
1657
1664
 
1658
- case 9:
1665
+ case 11:
1659
1666
  withIncluded = _context11.sent;
1660
1667
  return _context11.abrupt("return", withIncluded);
1661
1668
 
1662
- case 11:
1669
+ case 13:
1670
+ return _context11.abrupt("return", mainResponse);
1671
+
1672
+ case 14:
1663
1673
  case "end":
1664
1674
  return _context11.stop();
1665
1675
  }
@@ -3133,7 +3143,7 @@ var CozyClient = /*#__PURE__*/function () {
3133
3143
  CozyClient.hooks = CozyClient.hooks || {};
3134
3144
  CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
3135
3145
 
3136
- CozyClient.version = "58.1.0";
3146
+ CozyClient.version = "58.2.0";
3137
3147
 
3138
3148
  _microee.default.mixin(CozyClient);
3139
3149
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-client",
3
- "version": "58.1.0",
3
+ "version": "58.2.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.node.js",
6
6
  "browser": "dist/index.js",
@@ -74,5 +74,5 @@
74
74
  "react-native-ios11-devicecheck": "^0.0.3"
75
75
  },
76
76
  "sideEffects": false,
77
- "gitHead": "e47b44f14cac28454265ceea790e0d7cb78dfc5a"
77
+ "gitHead": "3a6e5104325605d3d9c74ae5a1738e16289b659d"
78
78
  }