fix(utils): More resilient object from string path (#5929)

**What**
More resilient util in case an undefined, nu,, '' value is passed as part of the relations
This commit is contained in:
Adrien de Peretti authored and GitHub committed 2023-12-21 09:28:13 +00:00
1 parent 29bb2e4f6e
commit c41f3002f3
2 files changed
+8

No files matched your search

@@ -49,6 +49,9 @@ export function objectFromStringPath(
const output: Record<string, any> = {}
for (const relation of collection) {
if (!relation) {
continue
}
if (relation.indexOf(".") > -1) {
const nestedRelations = relation.split(".")