mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
stream_create: Fix early read of page_params.
For spectators, page_params.realm_create_public_stream_policy, page_params.server_web_public_streams_enabled, page_params.realm_enable_spectator_access have not been initialized yet at module load time. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
8f069ac1d8
commit
80432c8c06
@@ -117,9 +117,7 @@ class StreamNameError {
|
|||||||
const stream_name_error = new StreamNameError();
|
const stream_name_error = new StreamNameError();
|
||||||
|
|
||||||
// Stores the previous state of the stream creation checkbox.
|
// Stores the previous state of the stream creation checkbox.
|
||||||
let stream_announce_previous_value =
|
let stream_announce_previous_value;
|
||||||
settings_data.user_can_create_public_streams() ||
|
|
||||||
settings_data.user_can_create_web_public_streams();
|
|
||||||
|
|
||||||
// Within the new stream modal...
|
// Within the new stream modal...
|
||||||
function update_announce_stream_state() {
|
function update_announce_stream_state() {
|
||||||
@@ -383,6 +381,10 @@ export function show_new_stream_modal() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function set_up_handlers() {
|
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();
|
const $people_to_add_holder = $("#people_to_add").expectOne();
|
||||||
stream_create_subscribers.create_handlers($people_to_add_holder);
|
stream_create_subscribers.create_handlers($people_to_add_holder);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user