Skip to content

Commit

Permalink
Fixes #748.
Browse files Browse the repository at this point in the history
  • Loading branch information
SeppPenner committed Oct 2, 2024
1 parent 03ba430 commit 56ea542
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ const ConnectionSettings = memo(function ConnectionSettings(props: Props) {
<Button
className={classes.button}
color="secondary"
onClick={() => props.managerActions.addSubscription({ topic, qos }, props.connection.id)}
onClick={() => {
const trimmedTopic = topic.trim();
if (trimmedTopic !== "") {
props.managerActions.addSubscription({ topic: trimmedTopic, qos }, props.connection.id);
}
}}
variant="contained"
disabled={topic.trim() === ""}
>
<Add /> Add
</Button>
Expand Down

0 comments on commit 56ea542

Please sign in to comment.