Browse Source

[NO JIRA] Fixing bugs and code smells

tags/10.1.0.73491
Revanshu Paliwal 11 months ago
parent
commit
45c6d03fa1

+ 2
- 2
server/sonar-web/src/main/js/apps/code/utils.ts View File

@@ -27,9 +27,9 @@ import {
addComponent,
addComponentBreadcrumbs,
addComponentChildren,
getComponent as getComponentFromBucket,
getComponentBreadcrumbs,
getComponentChildren,
getComponent as getComponentFromBucket,
} from './bucket';

const METRICS = [
@@ -287,7 +287,7 @@ export function loadMoreChildren(
}

export function mostCommonPrefix(strings: string[]) {
const sortedStrings = strings.slice(0).sort();
const sortedStrings = strings.slice(0).sort((a, b) => a.localeCompare(b));
const firstString = sortedStrings[0];
const firstStringLength = firstString.length;
const lastString = sortedStrings[sortedStrings.length - 1];

+ 1
- 1
server/sonar-web/src/main/js/components/issue/popups/CommentTile.tsx View File

@@ -59,7 +59,7 @@ export default class CommentTile extends React.PureComponent<CommentTileProps, C
render() {
const { comment } = this.props;
const { showEditArea } = this.state;
const author = comment.authorName || comment.author;
const author = comment.authorName ?? comment.author;
const displayName =
comment.authorActive === false && author
? translateWithParameters('user.x_deleted', author)

Loading…
Cancel
Save