mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
stream_id: Replace empty string with undefined.
This commit also limits `stream_bar.decorate` to only be able to be called for stream messages, since it's an undefined string_id is no longer a sign that you're dealing with a DM.
This commit is contained in:
@@ -79,7 +79,7 @@ function get_stream_id_for_textarea($textarea) {
|
||||
return Number.parseInt(stream_id_str, 10);
|
||||
}
|
||||
|
||||
return compose_state.stream_id() || undefined;
|
||||
return compose_state.stream_id();
|
||||
}
|
||||
|
||||
export function warn_if_private_stream_is_linked(linked_stream, $textarea) {
|
||||
@@ -480,7 +480,7 @@ export function validate_stream_message_address_info(stream_name) {
|
||||
function validate_stream_message(scheduling_message) {
|
||||
const stream_id = compose_state.stream_id();
|
||||
const $banner_container = $("#compose_banners");
|
||||
if (stream_id === "") {
|
||||
if (stream_id === undefined) {
|
||||
compose_banner.show_error_message(
|
||||
$t({defaultMessage: "Please specify a stream."}),
|
||||
compose_banner.CLASSNAMES.missing_stream,
|
||||
|
||||
Reference in New Issue
Block a user