Skip to content

Commit 11aadc0

Browse files
authored
Delete trailing hyphen if description is empty (#191)
1 parent e09f40d commit 11aadc0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/jupyter-chat/src/components/input/use-chat-commands.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,14 @@ export function useChatCommands(
144144
<Box key={key} component="li" {...listItemProps}>
145145
{commandIcon}
146146
<p className="jp-chat-command-name">{command.name}</p>
147-
<span> - </span>
148-
<p className="jp-chat-command-description">{command.description}</p>
147+
{command.description && (
148+
<>
149+
<span> - </span>
150+
<p className="jp-chat-command-description">
151+
{command.description}
152+
</p>
153+
</>
154+
)}
149155
</Box>
150156
);
151157
},

0 commit comments

Comments
 (0)