@dynamatix/cat-shared 0.0.130 → 0.0.132

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.
@@ -16,7 +16,12 @@ function getNestedProperty(obj, path) {
16
16
  return obj[path];
17
17
  }
18
18
 
19
- // Handle nested property access
19
+ // First check if the flattened key exists (MongoDB style: "additionalData.statusLid")
20
+ if (obj.hasOwnProperty(path)) {
21
+ return obj[path];
22
+ }
23
+
24
+ // Then try nested object structure
20
25
  return path.split('.').reduce((current, key) => {
21
26
  return current && current[key] !== undefined ? current[key] : undefined;
22
27
  }, obj);
@@ -31,7 +36,12 @@ function hasNestedProperty(obj, path) {
31
36
  return obj.hasOwnProperty(path);
32
37
  }
33
38
 
34
- // Handle nested property access
39
+ // First check if the flattened key exists (MongoDB style: "additionalData.statusLid")
40
+ if (obj.hasOwnProperty(path)) {
41
+ return true;
42
+ }
43
+
44
+ // Then check nested object structure
35
45
  const keys = path.split('.');
36
46
  let current = obj;
37
47
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/cat-shared",
3
- "version": "0.0.130",
3
+ "version": "0.0.132",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"