@prestizni-software/client-dem 0.2.17 → 0.2.18

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.
@@ -469,15 +469,24 @@ function checkForMissingRefs<C extends Constructor<any>>(
469
469
  !entryKeys.includes(prop.toString()) &&
470
470
  getMetadataRecursive("isRef", classParam.prototype, prop.toString())
471
471
  ) {
472
- (data as any)[prop] = Object.values(autoClassers).find((autoClasser) =>
473
- autoClasser.objectsAsArray.find((object) =>
474
- Object.values(object.extractedData).find((value) =>
475
- Array.isArray(value)
476
- ? value.includes(data._id)
477
- : value === data._id
478
- )
479
- )
480
- );
472
+ findMissingObjectReference(data, prop, autoClassers);
473
+ }
474
+ }
475
+ }
476
+ }
477
+ function findMissingObjectReference(
478
+ data: any,
479
+ prop: any,
480
+ autoClassers: { [key: string]: AutoUpdateManager<any> }
481
+ ) {
482
+ for(const ac of Object.values(autoClassers)){
483
+ for(const obj of ac.objectsAsArray){
484
+ const found = Object.values(obj.extractedData).find((value) =>
485
+ Array.isArray(value) ? value.includes(data._id) : value === data._id
486
+ )
487
+ if(found){
488
+ data[prop] = obj._id;
489
+ return;
481
490
  }
482
491
  }
483
492
  }
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.2.18](https://github.com/Prestizni-Software/client-dem/compare/v0.2.17...v0.2.18) (2025-11-10)
6
+
5
7
  ### [0.2.17](https://github.com/Prestizni-Software/client-dem/compare/v0.2.16...v0.2.17) (2025-11-10)
6
8
 
7
9
  ### [0.2.16](https://github.com/Prestizni-Software/client-dem/compare/v0.2.15...v0.2.16) (2025-11-10)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prestizni-software/client-dem",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "description": "An solution for when making http requests is not a good solution",
5
5
  "keywords": [
6
6
  "websockets"