-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(1391): Wrong speling of SpringBoot in Catalog #1471
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1471 +/- ##
=======================================
Coverage ? 68.65%
Complexity ? 26
=======================================
Files ? 269
Lines ? 7724
Branches ? 1496
=======================================
Hits ? 5303
Misses ? 2418
Partials ? 3 ☔ View full report in Codecov by Sentry. |
packages/ui/src/components/Visualization/ContextToolbar/RuntimeSelector/RuntimeSelector.tsx
Outdated
Show resolved
Hide resolved
@@ -21,7 +21,7 @@ const getIcon = (name: string) => { | |||
<img src={quarkusLogo} /> | |||
</Icon> | |||
); | |||
} else if (name.includes('SpringBoot')) { | |||
} else if (name.replace(' ', '').includes('SpringBoot')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tplevko, I'm sorry, replace
only catches the first occurrence 🤦♂️ , my bad. There's also replaceAll
but is for a newer library, so our safest bet would be to use a RegExp in this case.
First, create a RegExp like the following:
const SPACE_REGEX = /\s/g;
it could be above getIcon
:
const SPACE_REGEX = /\s/g;
const getIcon = (name: string) => {
if (name.includes('redhat')) {
...
Then use it in the replace
method.
} else if (name.replace(' ', '').includes('SpringBoot')) { | |
} else if (name.replace(SPACE_REGEX, '').includes('SpringBoot')) { |
Quality Gate passedIssues Measures |
fixes #1391