Skip to content

Commit

Permalink
fix: using the getChatType function in the isWorkspaceThread function…
Browse files Browse the repository at this point in the history
… to solve regression #38171

* fixing isWorkspaceThread function regression

* double negation  (`!!`) on the `getChatType` function
  • Loading branch information
Tony-MK authored Mar 12, 2024
1 parent 1533507 commit 01f92b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ function hasOnlyTransactionsWithPendingRoutes(iouReportID: string | undefined):
* If the report is a thread and has a chat type set, it is a workspace chat.
*/
function isWorkspaceThread(report: OnyxEntry<Report>): boolean {
return isThread(report) && isChatReport(report) && !isDM(report);
return isThread(report) && isChatReport(report) && !!getChatType(report);
}

/**
Expand Down

0 comments on commit 01f92b2

Please sign in to comment.