Skip to content

Revert "fix: an empty report state shows briefly when opening transaction thread in Reports" #61778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libs/MoneyRequestReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function isSingleTransactionReport(report: OnyxEntry<Report>, transactions: Tran
* Likewise, if report has only 1 connected transaction, then we also use other views.
*/
function shouldDisplayReportTableView(report: OnyxEntry<Report>, transactions: Transaction[]) {
if (!report || !transactions.length) {
if (!report || (!transactions.length && report.type === 'iou')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about this solution, it just uses assumption the iou report wont ever be empty which technically could happen too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. So I suggest reverting the entire condition for now, as I don't yet fully understand the flow of the new table report view and how we handle data there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

return false;
}

Expand Down
Loading