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:
committed by
GitHub
parent
29bb2e4f6e
commit
c41f3002f3
@@ -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(".")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user