mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
ui_report: Do not pass jQuery element to the html method.
Although it works, this feature is not documented.
This commit is contained in:
committed by
Tim Abbott
parent
9e08c6db93
commit
fd45ef57fa
@@ -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!"}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user