Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

stream_create: Fix early read of page_params.

Anders Kaseorg80432c8c06fc
diff --git a/web/src/stream_create.js b/web/src/stream_create.js
index a3af22fe842..3c36afbb5db 100644
--- a/web/src/stream_create.js
+++ b/web/src/stream_create.js
@@ -117,9 +117,7 @@ class StreamNameError {
const stream_name_error = new StreamNameError();
// Stores the previous state of the stream creation checkbox.
-let stream_announce_previous_value =
- settings_data.user_can_create_public_streams() ||
- settings_data.user_can_create_web_public_streams();
+let stream_announce_previous_value;
// Within the new stream modal...
function update_announce_stream_state() {
@@ -383,6 +381,10 @@ export function show_new_stream_modal() {
}
export function set_up_handlers() {
+ stream_announce_previous_value =
+ settings_data.user_can_create_public_streams() ||
+ settings_data.user_can_create_web_public_streams();
+
const $people_to_add_holder = $("#people_to_add").expectOne();
stream_create_subscribers.create_handlers($people_to_add_holder);