Skip to content

Commit

Permalink
stream_popover: Fix type bug.
Browse files Browse the repository at this point in the history
The variable `select_stream_id` was assumed to be of type number when
it actually was of type string. A strict equality check was performed later
down in the code between `select_stream_id` and `current_stream_id`
(which is of type number).

This commit converts the variable `select_stream_id` to type number.
  • Loading branch information
kuv2707 authored and timabbott committed Apr 22, 2024
1 parent 9aa6bbc commit cdb06ff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions web/src/stream_popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ export async function build_move_topic_to_stream_popover(
send_notification_to_new_thread = send_notification_to_new_thread === "on";
send_notification_to_old_thread = send_notification_to_old_thread === "on";
current_stream_id = Number.parseInt(current_stream_id, 10);
select_stream_id = Number.parseInt(select_stream_id, 10);

if (new_topic_name !== undefined) {
// new_topic_name can be undefined when the new topic input is disabled when
Expand Down

0 comments on commit cdb06ff

Please sign in to comment.