From 74250261f2ae1efbc59c67bb59a216e9a51b7720 Mon Sep 17 00:00:00 2001 From: firmansyah Date: Mon, 29 Jun 2026 13:39:41 +0700 Subject: [PATCH] fix bug some array filter --- dist/index.js | 2 +- src/components/ListVirtual.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 6894137..05c9038 100644 --- a/dist/index.js +++ b/dist/index.js @@ -19487,7 +19487,7 @@ function Nv({ }, Y = Zc(async (B = "", V = 0, U = !1) => { z(!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 { const D = await Ao.search( r, diff --git a/src/components/ListVirtual.jsx b/src/components/ListVirtual.jsx index 3e2976f..2436ebc 100644 --- a/src/components/ListVirtual.jsx +++ b/src/components/ListVirtual.jsx @@ -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)); } - if (filter.some(f => f.name === "company_id")) { + if (Array.isArray(filter) && filter.some(f => f.name === "company_id")) { payload.addJoin("company", ["name"]); }