diff --git a/src/features/surname_table/surname_table.js b/src/features/surname_table/surname_table.js index c575799a..5a93e1ce 100644 --- a/src/features/surname_table/surname_table.js +++ b/src/features/surname_table/surname_table.js @@ -406,7 +406,7 @@ async function initSurnameTableSorting() { $(this).attr("data-birth-location-small2big", birthLocation); const deathDate = deathDateMatch ? deathDateMatch[0] : ""; - const deathLocation = deathLocationMatch ? deathLocationMatch[1] : ""; + let deathLocation = deathLocationMatch ? deathLocationMatch[1] : ""; $(this).attr("data-death-location-small2big", deathLocation); // Proceed to create and insert new elements as before @@ -415,11 +415,14 @@ async function initSurnameTableSorting() { birthLocationTD.insertAfter(birthTD); let deathLocationTD = null; - if (deathLocation) { - deathLocationTD = $("").html(deathLocation); - deathTD.html(deathDate); - deathLocationTD.insertAfter(deathTD); + if (deathLocation == null) { + deathLocation = ""; } + //if (deathLocation || deathDate) { + deathLocationTD = $("").html(deathLocation); + deathTD.html(deathDate); + deathLocationTD.insertAfter(deathTD); + //} } $(this).attr("data-birth-location-big2small", birthLocation.trim().split(", ").reverse().join(", ")); });