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.

billing: Fix implicit use of any.

Anders Kaseorgd1e2fefad258
diff --git a/web/src/billing/billing.ts b/web/src/billing/billing.ts
index bd935ec8427..389baa69801 100644
--- a/web/src/billing/billing.ts
+++ b/web/src/billing/billing.ts
@@ -383,8 +383,9 @@ export function initialize(): void {
);
},
error(xhr) {
- if (xhr.responseJSON?.msg) {
- $("#org-billing-frequency-change-error").text(xhr.responseJSON.msg);
+ const parsed = z.object({msg: z.string()}).safeParse(xhr.responseJSON);
+ if (parsed.success) {
+ $("#org-billing-frequency-change-error").text(parsed.data.msg);
}
},
});