diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2023-08-18 12:20:46 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-08-22 20:03:05 +0000 |
commit | 8e85496afd806079b9125f351cf5574f65ff8147 (patch) | |
tree | c96218e0e1470bf574e621bc932cc40e599af9a5 | |
parent | 522fa260117430bc04d259f74dba57a1deb3f14b (diff) | |
download | sonarqube-8e85496afd806079b9125f351cf5574f65ff8147.tar.gz sonarqube-8e85496afd806079b9125f351cf5574f65ff8147.zip |
[NO JIRA] Fix Code Smells
-rw-r--r-- | server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx index 1d29eddbcb0..152976ad5cc 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx @@ -134,7 +134,7 @@ export default class RuleListItem extends React.PureComponent<Props> { return null; } - const canCopy = selectedProfile.actions && selectedProfile.actions.copy; + const canCopy = selectedProfile.actions?.copy; if (selectedProfile.isBuiltIn && canCopy) { return ( <td className="coding-rule-table-meta-cell coding-rule-activation-actions"> @@ -147,7 +147,7 @@ export default class RuleListItem extends React.PureComponent<Props> { ); } - const canEdit = selectedProfile.actions && selectedProfile.actions.edit; + const canEdit = selectedProfile.actions?.edit; if (!canEdit) { return null; } |