fix: ตรวจค่า undefined

This commit is contained in:
Net 2024-06-17 15:51:39 +07:00
parent d3456493e9
commit ab8d6e4e4d

View file

@ -72,7 +72,9 @@ async function fetchList() {
: 'INACTIVE',
});
if (result) {
currentCustomerName.value = result.result[0].customer?.customerName ?? '';
if (currentStatus.value !== 'INACTIVE') {
currentCustomerName.value = result.result[0].customer?.customerName ?? '';
}
maxPageBranch.value = Math.ceil(result.total / pageSizeBranch.value);
branch.value = result.result;
}