@communecter/cocolight-api-client 1.0.68 → 1.0.69

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@communecter/cocolight-api-client",
3
- "version": "1.0.68",
3
+ "version": "1.0.69",
4
4
  "description": "Client Axios simplifié pour l'API cocolight",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,13 +37,14 @@ export class Comment extends BaseEntity<CommentItemNormalized> {
37
37
  data.author = this._linkNestedEntity(data.author);
38
38
  }
39
39
 
40
- // Transformer les replies récursivement si présentes
41
40
  if (Array.isArray(data.replies)) {
42
41
  data.replies = data.replies.map(reply => {
43
- if (reply.author) {
44
- reply.author = this._linkNestedEntity(reply.author);
42
+ // Ajouter les propriétés nécessaires pour _linkNestedEntity
43
+ if (reply && typeof reply === "object" && !reply.type) {
44
+ reply.type = "comments";
45
+ reply.collection = "comments";
45
46
  }
46
- return reply;
47
+ return this._linkNestedEntity(reply);
47
48
  });
48
49
  }
49
50