Skip to content

Commit f9da61e

Browse files
authored
fix(components): fix title prop null check in DropdownMenu (#19139)
This PR fixes the logic for nullish `title` prop in `DropdownMenu`, changing the check from `title !== null` to `title != null`, such that an undefined title results in this condition evaluating to `false`. The result is that when `title` is undefined, there will be no 8px spacing above the clickable dropdown box. Closes RQA-4497
1 parent 83e6c7f commit f9da61e

File tree

1 file changed

+1
-1
lines changed
  • components/src/molecules/DropdownMenu

1 file changed

+1
-1
lines changed

components/src/molecules/DropdownMenu/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element {
260260
gridGap={SPACING.spacing8}
261261
width={width}
262262
>
263-
{title !== null ? (
263+
{title != null ? (
264264
<Flex gridGap={SPACING.spacing8} alignItems={ALIGN_CENTER}>
265265
<StyledText
266266
desktopStyle="bodyDefaultRegular"

0 commit comments

Comments
 (0)