mirror of https://github.com/zulip/zulip.git
stream_edit_subscribers: Rename misleading variable.
.safeParse does not return a “schema”. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
15d4866856
commit
39d4ddaa96
|
@ -246,7 +246,7 @@ function subscribe_new_users({pill_user_ids}: {pill_user_ids: number[]}): void {
|
||||||
function invite_failure(xhr: JQuery.jqXHR): void {
|
function invite_failure(xhr: JQuery.jqXHR): void {
|
||||||
let message = "Failed to subscribe user!";
|
let message = "Failed to subscribe user!";
|
||||||
|
|
||||||
const failure_response_schema = z
|
const parsed = z
|
||||||
.object({
|
.object({
|
||||||
result: z.literal("error"),
|
result: z.literal("error"),
|
||||||
msg: z.string(),
|
msg: z.string(),
|
||||||
|
@ -254,8 +254,8 @@ function subscribe_new_users({pill_user_ids}: {pill_user_ids: number[]}): void {
|
||||||
})
|
})
|
||||||
.safeParse(xhr.responseJSON);
|
.safeParse(xhr.responseJSON);
|
||||||
|
|
||||||
if (failure_response_schema.success) {
|
if (parsed.success) {
|
||||||
message = failure_response_schema.data.msg;
|
message = parsed.data.msg;
|
||||||
}
|
}
|
||||||
show_stream_subscription_request_result({
|
show_stream_subscription_request_result({
|
||||||
message,
|
message,
|
||||||
|
|
Loading…
Reference in New Issue