diff --git a/.changeset/mighty-jokes-prove.md b/.changeset/mighty-jokes-prove.md new file mode 100644 index 0000000000..646c31ad9a --- /dev/null +++ b/.changeset/mighty-jokes-prove.md @@ -0,0 +1,5 @@ +--- +"@medusajs/utils": patch +--- + +Fix/utils object from string path diff --git a/packages/utils/src/common/object-from-string-path.ts b/packages/utils/src/common/object-from-string-path.ts index 77177cffdf..26de1fbf22 100644 --- a/packages/utils/src/common/object-from-string-path.ts +++ b/packages/utils/src/common/object-from-string-path.ts @@ -49,6 +49,9 @@ export function objectFromStringPath( const output: Record = {} for (const relation of collection) { + if (!relation) { + continue + } if (relation.indexOf(".") > -1) { const nestedRelations = relation.split(".")