Skip to content
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 FE when tag name is undefined #2146

Merged
merged 4 commits into from
Oct 25, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
done
Signed-off-by: rashidakanchwala <rashida_kanchwala@mckinsey.com>
rashidakanchwala committed Oct 25, 2024
commit b1528e0198e3aaf02791f66eb908e12ac3b5177b
5 changes: 4 additions & 1 deletion src/utils/index.js
Original file line number Diff line number Diff line change
@@ -120,7 +120,10 @@ export const stripNamespace = (str) => {
* @param {String} str The string to check
* @returns {String} The string with or without replaced values
*/
export const prettifyName = (str = '') => {
export const prettifyName = (str) => {
if (!str) {
return '';
}
const replacedString = str
.replace(/-/g, ' ')
.replace(/_/g, ' ')

Unchanged files with check annotations Beta

// sliced-pipeline-action-bar.test.js
import React from 'react';
import { render, screen } from '@testing-library/react';

Check warning on line 3 in src/components/sliced-pipeline-action-bar/sliced-pipeline-action-bar.test.js

GitHub Actions / javascript_lint_and_tests

'screen' is defined but never used

Check warning on line 3 in src/components/sliced-pipeline-action-bar/sliced-pipeline-action-bar.test.js

GitHub Actions / javascript_lint_and_tests

'screen' is defined but never used
import { SlicedPipelineActionBar } from './sliced-pipeline-action-bar';
describe('SlicedPipelineActionBar', () => {