fix(medusa): Order edit confirmation conflict line items update (#5867)
* fix(medusa): Order edit confirmation conflict line items update * naming * Create serious-flowers-provide.md * another proposal * fixes
This commit is contained in:
committed by
GitHub
parent
1c6c759aa8
commit
2826605b01
@@ -97,8 +97,20 @@ export function buildQuery<TWhereKeys extends object, TEntity = unknown>(
|
||||
*/
|
||||
function buildWhere<TWhereKeys extends object, TEntity>(
|
||||
constraints: TWhereKeys
|
||||
): FindOptionsWhere<TEntity> {
|
||||
const where: FindOptionsWhere<TEntity> = {}
|
||||
): FindOptionsWhere<TEntity> | FindOptionsWhere<TEntity>[] {
|
||||
let where: FindOptionsWhere<TEntity> | FindOptionsWhere<TEntity>[] = {}
|
||||
|
||||
if (Array.isArray(constraints)) {
|
||||
where = []
|
||||
constraints.forEach((constraint) => {
|
||||
;(where as FindOptionsWhere<TEntity>[]).push(
|
||||
buildWhere(constraint) as FindOptionsWhere<TEntity>
|
||||
)
|
||||
})
|
||||
|
||||
return where
|
||||
}
|
||||
|
||||
for (const [key, value] of Object.entries(constraints)) {
|
||||
if (value === undefined) {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user