Skip to content

Commit b98fa40

Browse files
Move comment above the if-block it describes
Co-authored-by: Aimane Chnaif <aimane-chnaif@users.noreply.github.com>
1 parent 2abb02b commit b98fa40

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/libs/actions/OnyxDerived/configs/reportAttributes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,14 @@ export default createOnyxDerivedValueConfig({
302302
const willShowGreenSubmit = requiresAttention && actionGreenBadge === CONST.REPORT.ACTION_BADGE.SUBMIT;
303303

304304
// if report has errors or violations, show red dot
305+
// Also skip setting ERROR when we'll show the green Submit badge — let the user submit without fix.
305306
if (reasonAndReportAction && !willShowGreenSubmit) {
306307
needsParentChatErrorPropagation = true;
307308

308309
// RBR/Fix mirrors GBR's access rule: only show on the child when the user can't already
309310
// see it on the parent workspace chat. The parent still gets ERROR/FIX through the
310311
// propagation loop below, so the actionable indicator surfaces on the workspace chat row
311312
// (which is where C+ wants it). Skips when the chat parent isn't accessible to the user.
312-
// Also skip setting ERROR when we'll show the green Submit badge — let the user submit without fix.
313313
const chatPolicy = chatReport?.policyID ? policies?.[`${ONYXKEYS.COLLECTION.POLICY}${chatReport.policyID}`] : undefined;
314314
const isChildOfAccessiblePolicyExpenseChat = !!chatReport && isPolicyExpenseChat(chatReport) && (!!chatReport.isOwnPolicyExpenseChat || isPolicyAdmin(chatPolicy));
315315
if (!isChildOfAccessiblePolicyExpenseChat) {

0 commit comments

Comments
 (0)