From 7afedf2315178dcea6278257ae666128582de996 Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Fri, 3 Oct 2025 14:11:29 +0100 Subject: [PATCH] Null check in comment field --- webassets/js/code.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webassets/js/code.js b/webassets/js/code.js index 09b4036..1902f1b 100644 --- a/webassets/js/code.js +++ b/webassets/js/code.js @@ -101,6 +101,12 @@ function updateTable() { mode_string = mode_string + "" } + // Format comment + var commentText = ""; + if (s["comment"] != null) { + commentText = escapeHtml(s["comment"]); + } + // Format sig_refs var sig_refs = "" if (s["sig_refs"]) { @@ -129,7 +135,7 @@ function updateTable() { $tr.append(`${s["dx_flag"]}${s["dx_call"]}`); $tr.append(`${freq_string}`); $tr.append(`${mode_string}`); - $tr.append('' + escapeHtml(`${s["comment"]}`) + ''); + $tr.append(`${commentText}`); $tr.append(` ${s["source"]}`); $tr.append(`${sig_refs}`); $tr.append(`${de_flag}${s["de_call"]}`);