Skip to content

[HOLD for payment 2023-08-21] [$1000] errors props are incorrectly accessed in IOUCurrencySelection #23373

Description

@marcaaron

Coming from: #22198 (comment)

I noticed that in 3 out of 4 occurrences where shouldHideComposer is used. We are using props.errors when there is no prop errors. Here is a list -

ReportScreen - for hiding EmojiPickers

App/src/pages/home/ReportScreen.js

Line 164 in 058978e

if (ReportUtils.shouldHideComposer(this.props.report, this.props.errors)) {
MoneyRequestAmountPage - for dismissing modal
App/src/pages/iou/steps/MoneyRequestAmountPage.js

Line 213 in 058978e

if (!ReportUtils.shouldHideComposer(props.report, props.errors)) {
This one.

The only correct occurrence where errors are actually populated is in ReportFooter to hide the composer. The errors used there are -

lodashGet(report, 'errorFields.addWorkspaceRoom') || lodashGet(report, 'errorFields.createChat');

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0174717ad8fbbd1e71
  • Upwork Job ID: 1682495893949411328
  • 2023-07-21
  • Automatic offers:
    • mollfpr | Reviewer | 25682904
    • Nikhil-Vats | Contributor | 25682906

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions