Skip to content

Commit 08019cd

Browse files
committed
Update title handling in AIRulesSection: Replace rule.title with rule.title ?? rule.prompt to ensure a fallback to prompt when title is not available, enhancing user clarity.
1 parent ca94288 commit 08019cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/pages/workspace/rules/AIRulesSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function AIRulesSection({policyID, canWriteRules, showReadOnlyModal}: AIRulesSec
7878
onClose={() => clearPolicyAIRuleErrors(policyID, rule.ruleID, rule)}
7979
>
8080
<MenuItemWithTopDescription
81-
title={(rule.title || rule.prompt).replace(/\s+/g, ' ').trim()}
81+
title={(rule.title ?? rule.prompt).replaceAll(/\s+/g, ' ').trim()}
8282
numberOfLinesTitle={1}
8383
wrapperStyle={[styles.borderedContentCard, styles.ph4, styles.pv4]}
8484
shouldShowRightIcon

0 commit comments

Comments
 (0)