Skip to content

Commit

Permalink
fix: using regex to find and replace whitespace to hyphens (#3738)
Browse files Browse the repository at this point in the history
Co-authored-by: atarashansky <atarashansky@chanzuckerberg.com>
  • Loading branch information
ashin-czi and atarashansky authored Dec 14, 2022
1 parent 584f53b commit f8e1383
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default memo(function YAxisChart({
generateMarkerGenes,
selectedOrganismId,
}: Props): JSX.Element {
const tissueKey = tissue.replace(" ", "-");
const tissueKey = tissue.replace(/\s+/g, "-");
const yAxisSelectorQuery = `[data-test-id=cell-type-labels-${tissueKey}]`;

const dispatch = useContext(DispatchContext);
Expand All @@ -75,7 +75,7 @@ export default memo(function YAxisChart({
const isMarkerGenes = get(FEATURES.MARKER_GENES) === BOOLEAN.TRUE;

const setInfoCoordinates = () => {
const topTissueKey = selectedTissues[0].replace(" ", "-");
const topTissueKey = selectedTissues[0].replace(/\s+/g, "-");
const containerTop = document.querySelector(
`[data-test-id=cell-type-labels-${topTissueKey}]`
);
Expand Down

0 comments on commit f8e1383

Please sign in to comment.