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
2023-12-21 10:28:13 +01:00
committed by GitHub
parent 29bb2e4f6e
commit c41f3002f3
2 changed files with 8 additions and 0 deletions

View File

@@ -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(".")