@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/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 +6 -1
package/package.json
CHANGED
package/src/api/BaseEntity.js
CHANGED
|
@@ -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) {
|