Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Jan 13, 2025
1 parent 1359bc3 commit 7f83d60
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/components/Search/SearchRouter/SearchRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,6 @@ function SearchRouter({onRouterClose, shouldHideInputCaret}: SearchRouterProps)
let roomType: ValueOf<typeof CONST.SEARCH.DATA_TYPES> = CONST.SEARCH.DATA_TYPES.CHAT;
let autocompleteID: string | undefined = reportForContextualSearch.reportID;

if (reportForContextualSearch.isPolicyExpenseChat) {
roomType = CONST.SEARCH.DATA_TYPES.EXPENSE;
if (reportForContextualSearch.policyID) {
autocompleteID = reportForContextualSearch.policyID;
} else {
autocompleteID = '';
}
}

if (reportForContextualSearch.isInvoiceRoom) {
roomType = CONST.SEARCH.DATA_TYPES.INVOICE;
const report = reportForContextualSearch as SearchOption<Report>;
Expand All @@ -133,7 +124,11 @@ function SearchRouter({onRouterClose, shouldHideInputCaret}: SearchRouterProps)
}
if (reportForContextualSearch.isPolicyExpenseChat) {
roomType = CONST.SEARCH.DATA_TYPES.EXPENSE;
autocompleteID = reportForContextualSearch.policyID;
if (reportForContextualSearch.policyID) {
autocompleteID = reportForContextualSearch.policyID;
} else {
autocompleteID = '';
}
}

return [
Expand Down

0 comments on commit 7f83d60

Please sign in to comment.