aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx
index 10aee08b32f..a9fa8cdb795 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx
+++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx
@@ -123,8 +123,8 @@ export default class RuleDetailsDescription extends React.PureComponent<Props, S
sortedDescriptionSections(ruleDetails: RuleDetails) {
return sortBy(
- ruleDetails.descriptionSections,
- s => SECTION_ORDER[s.key] || Object.keys(SECTION_ORDER).length
+ ruleDetails.descriptionSections?.filter(section => SECTION_ORDER[section.key] !== undefined),
+ s => SECTION_ORDER[s.key]
);
}