cozy-ui-plus 6.1.0 → 6.1.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [6.1.1](https://github.com/cozy/cozy-libs/compare/cozy-ui-plus@6.1.0...cozy-ui-plus@6.1.1) (2026-04-02)
7
+
8
+ ### Bug Fixes
9
+
10
+ - Now getRelatedContactRelationships handle null arg ([d3677ba](https://github.com/cozy/cozy-libs/commit/d3677ba6cfd496db48ebe00fac401746fb6680c9))
11
+
6
12
  # [6.1.0](https://github.com/cozy/cozy-libs/compare/cozy-ui-plus@6.0.0...cozy-ui-plus@6.1.0) (2026-04-02)
7
13
 
8
14
  ### Bug Fixes
@@ -256,7 +256,8 @@ var createAddress = function createAddress(_ref2) {
256
256
  exports.createAddress = createAddress;
257
257
 
258
258
  var getRelatedContactRelationships = function getRelatedContactRelationships(relatedContact) {
259
- // Tips filter Boolean to remove undefined value from array when relatedContact is empty (see contactToFormValues)
259
+ if (!relatedContact) return {}; // Tips filter Boolean to remove undefined value from array when relatedContact is empty (see contactToFormValues)
260
+
260
261
  var data = relatedContact.filter(Boolean).reduce(function (acc, curr) {
261
262
  var relationType = curr.relatedContactLabel ? JSON.parse(curr.relatedContactLabel).type : 'related';
262
263
  var existingIndex = acc.findIndex(function (item) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui-plus",
3
- "version": "6.1.0",
3
+ "version": "6.1.1",
4
4
  "description": "Cozy-ui-plus is an extension of cozy-ui and provides components based on cozy-client",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
@@ -73,5 +73,5 @@
73
73
  "react-dom": "^16 || ^17 || ^18",
74
74
  "twake-i18n": ">=0.3.0"
75
75
  },
76
- "gitHead": "0ac8873a7ba8909f3b02cb719d9fc05133bf5a1d"
76
+ "gitHead": "aee7d46723561ad42f2cdc4fe96036ffe92adcdd"
77
77
  }
@@ -210,6 +210,8 @@ export const createAddress = ({ address, oldContact, t }) => {
210
210
  * @returns {Record<string, { data: { _id: string, _type: string }[] }>} - The related contacts relationships
211
211
  */
212
212
  export const getRelatedContactRelationships = relatedContact => {
213
+ if (!relatedContact) return {}
214
+
213
215
  // Tips filter Boolean to remove undefined value from array when relatedContact is empty (see contactToFormValues)
214
216
  const data = relatedContact.filter(Boolean).reduce((acc, curr) => {
215
217
  const relationType = curr.relatedContactLabel