Skip to content

Commit

Permalink
added the optional chaning for recentCategoriesOriginal (#2808)
Browse files Browse the repository at this point in the history
  • Loading branch information
devendrafyle authored Mar 6, 2024
1 parent 10fff69 commit 16c4ef3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/fyle/add-edit-expense/add-edit-expense.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2557,7 +2557,7 @@ export class AddEditExpensePage implements OnInit {

this.fg.controls.project.valueChanges.subscribe((project: { project_org_category_ids: number[] }) => {
if (project && project.project_org_category_ids.length !== 0) {
this.recentCategories = this.recentCategoriesOriginal.filter((originalCategory) =>
this.recentCategories = this.recentCategoriesOriginal?.filter((originalCategory) =>
project.project_org_category_ids.includes(originalCategory.value.id)
);
} else {
Expand Down

0 comments on commit 16c4ef3

Please sign in to comment.