diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue index b06444775..0ea094e23 100644 --- a/src/pages/Worker/WorkerList.vue +++ b/src/pages/Worker/WorkerList.vue @@ -132,9 +132,7 @@ async function autofillBic(worker) { let filter = { where: { id: bankEntityId } }; const { data } = await axios.get(`BankEntities`, { params: { filter } }); - const hasData = data && data[0]; - if (hasData) worker.bankEntityFk = data[0].id; - else if (!hasData) worker.bankEntityFk = undefined; + worker.bankEntityFk = data?.[0]?.id ?? undefined; }