@communecter/cocolight-api-client 1.0.40 → 1.0.41

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.40",
3
+ "version": "1.0.41",
4
4
  "description": "Client Axios simplifié pour l'API cocolight",
5
5
  "repository": {
6
6
  "type": "git",
@@ -768,7 +768,14 @@ export class BaseEntity {
768
768
  _createDraftProxy(apiClient, server = {}, draft = {}, allowedFields = [], transforms = {}, options = {}) {
769
769
  return new Proxy({}, {
770
770
  get: (_, prop) => {
771
- const val = prop in draft ? draft[prop] : server[prop];
771
+ let val;
772
+
773
+ try {
774
+ val = prop in draft ? draft[prop] : (server && typeof server === "object" ? server[prop] : undefined);
775
+ } catch {
776
+ val = undefined;
777
+ }
778
+
772
779
  const transformer = transforms[prop];
773
780
  return typeof transformer === "function" ? transformer(val) : val;
774
781
  },