diff --git a/src/app/fyle/add-edit-expense/add-edit-expense.page.ts b/src/app/fyle/add-edit-expense/add-edit-expense.page.ts index de4e2ed6b7..b278216a1c 100644 --- a/src/app/fyle/add-edit-expense/add-edit-expense.page.ts +++ b/src/app/fyle/add-edit-expense/add-edit-expense.page.ts @@ -439,7 +439,7 @@ export class AddEditExpensePage implements OnInit { selectedCategory$: Observable; - vendorOptions: string[]; + vendorOptions: string[] = []; constructor( private activatedRoute: ActivatedRoute, @@ -4556,6 +4556,9 @@ export class AddEditExpensePage implements OnInit { } private filterVendor(vendor: string): string | null { + if (!vendor || this.vendorOptions?.length === 0) { + return vendor; + } return this.vendorOptions?.find((option) => option.toLowerCase() === vendor.toLowerCase()) || null; }