mirror of
https://github.com/strapi/strapi.git
synced 2025-11-12 08:08:05 +00:00
use _.castArray instead, it'll only cast the value to an array if it's not the case already
This commit is contained in:
parent
2090ae761e
commit
dfead41387
@ -1107,14 +1107,14 @@ module.exports = function(strapi) {
|
|||||||
result.key = `where.${key}`;
|
result.key = `where.${key}`;
|
||||||
result.value = {
|
result.value = {
|
||||||
symbol: 'IN',
|
symbol: 'IN',
|
||||||
value: _.isArray(value) ? value : [value],
|
value: _.castArray(value),
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case '_nin':
|
case '_nin':
|
||||||
result.key = `where.${key}`;
|
result.key = `where.${key}`;
|
||||||
result.value = {
|
result.value = {
|
||||||
symbol: 'NOT IN',
|
symbol: 'NOT IN',
|
||||||
value: _.isArray(value) ? value : [value],
|
value: _.castArray(value),
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user