Skip to content

Commit

Permalink
add condition for safe
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanDylann committed Feb 1, 2024
1 parent 7fa0950 commit 2876149
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 @@ -885,7 +885,7 @@ function canModifyTask(taskReport: OnyxEntry<OnyxTypes.Report>, sessionAccountID
return true;
}

return ReportUtils.isAllowedToComment(taskReport);
return !isEmptyObject(taskReport) && ReportUtils.isAllowedToComment(taskReport);
}

function clearTaskErrors(reportID: string) {
Expand Down

0 comments on commit 2876149

Please sign in to comment.