We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
$rank
1 parent 3fdc59a commit d002950Copy full SHA for d002950
src/components/DriverName.js
@@ -3,9 +3,9 @@ import styled, { css } from 'styled-components';
3
const DriverNameInner = styled.span`
4
5
${
6
- props => props.theme.driverRanks[props.$rank?.replace('driver-', '')] && css`
+ props => typeof(props.$rank?.replace) === 'function' && props.theme.driverRanks[props.$rank.replace('driver-', '')] && css`
7
&::before {
8
- color: ${props.theme.driverRanks[props.$rank?.replace('driver-', '')]};
+ color: ${props.theme.driverRanks[props.$rank.replace('driver-', '')]};
9
content: '●';
10
margin-right: 4px;
11
font-style: normal;
0 commit comments