mirror of
https://github.com/zulip/zulip.git
synced 2025-11-22 07:21:23 +00:00
settings_components: Remove unnecessary toString calls.
The value for which the toString is called is already a string, so there is no need to call it. It would have been added to make sure that linter does not complain, so added an assert statement for it.
This commit is contained in:
@@ -990,9 +990,10 @@ export function populate_data_for_realm_settings_request(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (property_name === "org_join_restrictions") {
|
if (property_name === "org_join_restrictions") {
|
||||||
|
assert(typeof input_value === "string");
|
||||||
data = {
|
data = {
|
||||||
...data,
|
...data,
|
||||||
...get_request_data_for_org_join_restrictions(input_value.toString()),
|
...get_request_data_for_org_join_restrictions(input_value),
|
||||||
};
|
};
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -1038,11 +1039,10 @@ export function populate_data_for_stream_settings_request(
|
|||||||
if (input_value !== undefined && input_value !== null) {
|
if (input_value !== undefined && input_value !== null) {
|
||||||
const property_name = extract_property_name($input_elem);
|
const property_name = extract_property_name($input_elem);
|
||||||
if (property_name === "stream_privacy") {
|
if (property_name === "stream_privacy") {
|
||||||
|
assert(typeof input_value === "string");
|
||||||
data = {
|
data = {
|
||||||
...data,
|
...data,
|
||||||
...settings_data.get_request_data_for_stream_privacy(
|
...settings_data.get_request_data_for_stream_privacy(input_value),
|
||||||
input_value.toString(),
|
|
||||||
),
|
|
||||||
};
|
};
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user