Skip to content

Commit

Permalink
Update surname_table.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shogenapps committed Jun 2, 2024
1 parent 412dcc7 commit 6890355
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/features/surname_table/surname_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -415,11 +415,14 @@ async function initSurnameTableSorting() {
birthLocationTD.insertAfter(birthTD);

let deathLocationTD = null;
if (deathLocation) {
deathLocationTD = $("<td class='deathLocation'></td>").html(deathLocation);
deathTD.html(deathDate);
deathLocationTD.insertAfter(deathTD);
if (deathLocation == null) {
deathLocation = "";
}
//if (deathLocation || deathDate) {
deathLocationTD = $("<td class='deathLocation'></td>").html(deathLocation);
deathTD.html(deathDate);
deathLocationTD.insertAfter(deathTD);
//}
}
$(this).attr("data-birth-location-big2small", birthLocation.trim().split(", ").reverse().join(", "));
});
Expand Down

0 comments on commit 6890355

Please sign in to comment.