Skip to content

Commit

Permalink
Don't parse comment if we're getting original report title
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmlee101 committed Feb 6, 2025
1 parent 70f63cc commit 88c4526
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/actions/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ function editTask(report: OnyxTypes.Report, {title, description}: OnyxTypes.Task
const editTaskReportAction = ReportUtils.buildOptimisticEditedTaskFieldReportAction({title, description});

// Sometimes title or description is undefined, so we need to check for that, and we provide it to multiple functions
const reportName = ReportUtils.getParsedComment(title ?? report?.reportName ?? '')?.trim();
const reportName = title ? ReportUtils.getParsedComment(title)?.trim() : report?.reportName ?? '';

// Description can be unset, so we default to an empty string if so
const newDescription = typeof description === 'string' ? ReportUtils.getParsedComment(description) : report.description;
Expand Down

0 comments on commit 88c4526

Please sign in to comment.