@communecter/cocolight-api-client 1.0.44 → 1.0.45

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.44",
3
+ "version": "1.0.45",
4
4
  "description": "Client Axios simplifié pour l'API cocolight",
5
5
  "repository": {
6
6
  "type": "git",
@@ -295,12 +295,17 @@ export class BaseEntity {
295
295
 
296
296
 
297
297
  _toRawDeep(obj) {
298
+
299
+ if (!this || typeof this._toRawDeep !== "function") {
300
+ throw new Error("`this._toRawDeep` is not bound correctly. Use a lambda to preserve context.");
301
+ }
302
+
298
303
  if (isSignal(obj)) {
299
304
  return this._toRawDeep(obj.value);
300
305
  }
301
306
 
302
307
  if (Array.isArray(obj)) {
303
- return obj.map(this._toRawDeep);
308
+ return obj.map((item) => this._toRawDeep(item));
304
309
  }
305
310
 
306
311
  if (typeof obj === "object" && obj !== null) {