From fd45ef57fae7c5e24db5edf4c38d79ddaea04106 Mon Sep 17 00:00:00 2001 From: Priyank Patel Date: Tue, 15 Jun 2021 17:55:41 +0000 Subject: [PATCH] ui_report: Do not pass jQuery element to the html method. Although it works, this feature is not documented. --- static/js/ui_report.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/static/js/ui_report.js b/static/js/ui_report.js index cb973834f8..d450411ea0 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( - $("

").addClass("text-error").text(JSON.parse(xhr.responseText).msg), - ); + const $error = $("

").addClass("text-error").text(JSON.parse(xhr.responseText).msg); + btn.closest("td").empty().append($error); } else { btn.text($t({defaultMessage: "Failed!"})); }