From 4db72c357a35c0fd15f7d43f8dc1ee6a4fc06ca5 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 27 Jun 2022 17:20:55 +0100 Subject: [PATCH] Bug 31087: Prevent stringification of null in return claims The return claims table was stringifying 'null'. This patch updates the code to check for definition so we don't stringify incorrectly Note: This patch was split out from a follow-up on bug 28854 as we felt it should be treated separately for backportability. Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 41ce80eb12e738a55c697f51ecfb32a932a38959) Signed-off-by: Lucas Gass (cherry picked from commit f055a4ae654fe3fde66bd0d316fdbe98daba8f36) Signed-off-by: Arthur Suzuki --- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js index 6246684a06..ab6be6db89 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -997,8 +997,13 @@ $(document).ready(function() { { "sClass": "return-claim-notes-td", "mDataProp": function ( oObj ) { - return '' + oObj.notes + '' - + ''; + let notes = ''; + if ( oObj.notes ) { + notes += oObj.notes; + } + notes += ''; + notes += ''; + return notes; } }, { -- 2.39.5