chore(medusa): Align build query utils (#4148)
This commit is contained in:
committed by
GitHub
parent
bf18bd0c8a
commit
c0e527d6e0
5
.changeset/yellow-carpets-jam.md
Normal file
5
.changeset/yellow-carpets-jam.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/utils": patch
|
||||
---
|
||||
|
||||
chore(medusa): Align build query utils
|
||||
@@ -122,14 +122,18 @@ function buildWhere<TWhereKeys extends object, TEntity>(
|
||||
break
|
||||
default:
|
||||
if (objectValue != undefined && typeof objectValue === "object") {
|
||||
where[key].push(buildWhere<any, TEntity>(objectValue))
|
||||
where[key] = buildWhere<any, TEntity>(objectValue)
|
||||
return
|
||||
}
|
||||
where[key].push(value)
|
||||
where[key] = value
|
||||
}
|
||||
return
|
||||
})
|
||||
|
||||
if (!Array.isArray(where[key])) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (where[key].length === 1) {
|
||||
where[key] = where[key][0]
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user