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.

ui_report: Do not pass jQuery element to the html method.

Priyank Patelfd45ef57fae7
diff --git a/static/js/ui_report.js b/static/js/ui_report.js
index cb973834f80..d450411ea07 100644
--- a/static/js/ui_report.js
+++ b/static/js/ui_report.js
@@ -61,9 +61,8 @@ export function generic_embed_error(error_html) {
export function generic_row_button_error(xhr, btn) {
if (xhr.status >= 400 && xhr.status < 500) {
- btn.closest("td").html(
- $("<p>").addClass("text-error").text(JSON.parse(xhr.responseText).msg),
- );
+ const $error = $("<p>").addClass("text-error").text(JSON.parse(xhr.responseText).msg);
+ btn.closest("td").empty().append($error);
} else {
btn.text($t({defaultMessage: "Failed!"}));
}