@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/dist/cocolight-api-client.browser.js +1 -1
- package/dist/cocolight-api-client.cjs +1 -1
- package/dist/cocolight-api-client.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js.map +1 -1
- package/package.json +1 -1
- package/src/api/BaseEntity.js +8 -1
package/package.json
CHANGED
package/src/api/BaseEntity.js
CHANGED
|
@@ -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
|
-
|
|
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
|
},
|