Skip to content

Commit 88c8f92

Browse files
committed
fix: 🐛 handle empty SSH_SERVER_PORT with quick command button #470
1 parent 3c1ff79 commit 88c8f92

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Components/Repo/QuickCommands/QuickCommands.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function QuickCommands(props: QuickCommandsProps) {
2222
// Asynchronously call copy to clipboard
2323
navigator.clipboard
2424
.writeText(
25-
`ssh://${wizardEnv?.UNIX_USER}@${FQDN}${SSH_SERVER_PORT}/./${props.repositoryName}`
25+
`ssh://${wizardEnv?.UNIX_USER}@${FQDN}${SSH_SERVER_PORT ? SSH_SERVER_PORT : ''}/./${props.repositoryName}`
2626
)
2727
.then(() => {
2828
setIsCopied(true);
@@ -42,7 +42,7 @@ export default function QuickCommands(props: QuickCommandsProps) {
4242
) : (
4343
<div className={classes.tooltip}>
4444
ssh://{wizardEnv?.UNIX_USER}@{FQDN}
45-
{SSH_SERVER_PORT}/./
45+
{SSH_SERVER_PORT ? SSH_SERVER_PORT : ''}/./
4646
{props.repositoryName}
4747
</div>
4848
)}

0 commit comments

Comments
 (0)