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.

settings_linkifiers: Fix array/string confusion.

Anders Kaseorge23f81c72cfd
diff --git a/web/src/settings_linkifiers.ts b/web/src/settings_linkifiers.ts
index 27e414b1542..bbfd5180ad0 100644
--- a/web/src/settings_linkifiers.ts
+++ b/web/src/settings_linkifiers.ts
@@ -129,15 +129,15 @@ function handle_linkifier_api_error(
// dictionaries. This logic parses them.
const errors = xhr.responseJSON.errors;
if (errors.pattern !== undefined) {
- xhr.responseJSON.msg = errors.pattern;
+ xhr.responseJSON.msg = errors.pattern[0];
ui_report.error($t_html({defaultMessage: "Failed"}), xhr, pattern_status);
}
if (errors.url_template !== undefined) {
- xhr.responseJSON.msg = errors.url_template;
+ xhr.responseJSON.msg = errors.url_template[0];
ui_report.error($t_html({defaultMessage: "Failed"}), xhr, template_status);
}
if (errors.__all__ !== undefined) {
- xhr.responseJSON.msg = errors.__all__;
+ xhr.responseJSON.msg = errors.__all__[0];
ui_report.error($t_html({defaultMessage: "Failed"}), xhr, linkifier_status);
}
}