mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-04-22 19:02:10 +00:00
fix: specific request crash (#621)
This commit is contained in:
parent
a722ecbbda
commit
f39956e429
@ -124,20 +124,15 @@ export function recordToQuery<T extends object = object>(input: Record<string, s
|
|||||||
|
|
||||||
for (const it of value) {
|
for (const it of value) {
|
||||||
const params = parseParam(key, it)
|
const params = parseParam(key, it)
|
||||||
if (!query[key]) {
|
query[key] = query[key]
|
||||||
query[key] = params
|
? {
|
||||||
} else {
|
"$and": [
|
||||||
if (isObject(params)) {
|
query[key],
|
||||||
objectLoop(params, (v, k) => {
|
params
|
||||||
(query[key] as any)[k] = v
|
]
|
||||||
return
|
}
|
||||||
})
|
: params
|
||||||
} else {
|
|
||||||
query[key] = params
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return query as Query<T>
|
return query as Query<T>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user