fix bug some array filter
This commit is contained in:
parent
1d7370e557
commit
74250261f2
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -19487,7 +19487,7 @@ function Nv({
|
|||||||
}, Y = Zc(async (B = "", V = 0, U = !1) => {
|
}, Y = Zc(async (B = "", V = 0, U = !1) => {
|
||||||
z(!0);
|
z(!0);
|
||||||
const K = new Dn().setPaging(V, s).setOrder([n], !0);
|
const K = new Dn().setPaging(V, s).setOrder([n], !0);
|
||||||
B && K.like(n, B), m && m.length > 0 && m.forEach((D) => K.where(D.logic_operator || "=", D.name, D.value, D.operator || "AND", D.value1 || null, D.table_name || null)), m.some((D) => D.name === "company_id") && K.addJoin("company", ["name"]);
|
B && K.like(n, B), m && m.length > 0 && m.forEach((D) => K.where(D.logic_operator || "=", D.name, D.value, D.operator || "AND", D.value1 || null, D.table_name || null)), Array.isArray(m) && m.some((D) => D.name === "company_id") && K.addJoin("company", ["name"]);
|
||||||
try {
|
try {
|
||||||
const D = await Ao.search(
|
const D = await Ao.search(
|
||||||
r,
|
r,
|
||||||
|
|||||||
@ -72,7 +72,7 @@ export default function ListVirtual({
|
|||||||
filter.forEach(f => payload.where(f.logic_operator || "=", f.name, f.value, f.operator || "AND", f.value1 || null, f.table_name || null));
|
filter.forEach(f => payload.where(f.logic_operator || "=", f.name, f.value, f.operator || "AND", f.value1 || null, f.table_name || null));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filter.some(f => f.name === "company_id")) {
|
if (Array.isArray(filter) && filter.some(f => f.name === "company_id")) {
|
||||||
payload.addJoin("company", ["name"]);
|
payload.addJoin("company", ["name"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user