mirror of
https://github.com/strapi/strapi.git
synced 2025-08-17 13:16:08 +00:00
Merge pull request #2759 from strapi/fix-where-array
Fix ternary condition
This commit is contained in:
commit
26e7b39faa
@ -6,7 +6,7 @@ module.exports = {
|
|||||||
_.forEach(params.where, (where, key) => {
|
_.forEach(params.where, (where, key) => {
|
||||||
if (_.isArray(where.value) && where.symbol !== 'IN') {
|
if (_.isArray(where.value) && where.symbol !== 'IN') {
|
||||||
for (const value in where.value) {
|
for (const value in where.value) {
|
||||||
qb[value ? 'where' : 'orWhere'](key, where.symbol, where.value[value]);
|
qb[parseInt(value) ? 'orWhere' : 'where'](key, where.symbol, where.value[value]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qb.where(key, where.symbol, where.value);
|
qb.where(key, where.symbol, where.value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user