@dataloop-ai/components 0.19.95 → 0.19.96

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": "@dataloop-ai/components",
3
- "version": "0.19.95",
3
+ "version": "0.19.96",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -19,11 +19,13 @@ function getNestedProperty(obj: Record<string, any>, propertyPath: string) {
19
19
  return obj
20
20
  }
21
21
 
22
+ const isDefined = (value: any) => value !== undefined && value !== null
23
+
22
24
  const pathArray = propertyPath.split('.')
23
25
  let value = obj
24
26
 
25
27
  for (const prop of pathArray) {
26
- if (value && value[prop]) {
28
+ if (value && isDefined(value[prop])) {
27
29
  value = value[prop]
28
30
  } else {
29
31
  return undefined