@integry/sdk 4.7.7 → 4.7.8
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
|
@@ -421,15 +421,13 @@ const ListBox = (props: ListBoxProps) => {
|
|
|
421
421
|
if (/{([^}]+)}/.test(path)) {
|
|
422
422
|
return path.replace(/{([^}]+)}/g, (_, placeholder) => {
|
|
423
423
|
const keys = placeholder.split('.');
|
|
424
|
-
return (
|
|
425
|
-
keys.reduce((acc: any, key: any) => acc && acc[key], item) || ''
|
|
426
|
-
);
|
|
424
|
+
return keys.reduce((acc: any, key: any) => acc && acc?.[key], item);
|
|
427
425
|
});
|
|
428
426
|
}
|
|
429
427
|
|
|
430
428
|
// Otherwise, treat it as a plain property path
|
|
431
429
|
const keys = path.split('.');
|
|
432
|
-
return keys.reduce((acc: any, key) => acc && acc[key], item);
|
|
430
|
+
return keys.reduce((acc: any, key) => acc && acc?.[key], item);
|
|
433
431
|
};
|
|
434
432
|
|
|
435
433
|
// Resolve id and value using the helper function
|