Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/UserManagement/UserManagement.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@
let lastNameMatches = true;
if (trimmedLastNameSearch) {
if (isLastNameExactMatch) {
lastNameMatches = lastName === trimmedLastNameSearch.toLowerCase();
lastNameMatches = lastName === trimmedLastNameSearch.toLowerCase().replace(/\s+/g, '').trim();

Check warning on line 339 in src/components/UserManagement/UserManagement.jsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer `String#replaceAll()` over `String#replace()`.

See more on https://sonarcloud.io/project/issues?id=OneCommunityGlobal_HighestGoodNetworkApp&issues=AZrHfjrdcONpQyvoc4QO&open=AZrHfjrdcONpQyvoc4QO&pullRequest=4464
} else {
lastNameMatches = lastName.includes(trimmedLastNameSearch.toLowerCase());
lastNameMatches = lastName.includes(trimmedLastNameSearch.toLowerCase().replace(/\s+/g, '').trim());

Check warning on line 341 in src/components/UserManagement/UserManagement.jsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer `String#replaceAll()` over `String#replace()`.

See more on https://sonarcloud.io/project/issues?id=OneCommunityGlobal_HighestGoodNetworkApp&issues=AZrHfjrdcONpQyvoc4QP&open=AZrHfjrdcONpQyvoc4QP&pullRequest=4464
}
}

Expand Down
Loading