Skip to content

Commit

Permalink
Handle records with no xref
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Sep 23, 2024
1 parent 485e371 commit 84ba4d6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gedcom
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,12 @@ sub generate
foreach my $person(@{$params->{'everyone'}}) {
# foreach my $person(sort { $a->get_value('last name') cmp $b->get_value('last name') } $ged->individuals()) {
my $xref = $person->xref();
if(!defined($xref)) {
$index++;
complain({ person => $person, warning => 'has no xref' });
next;
}

if($me && ($xref eq $me->xref()) && !$opts{'a'}) {
$index++;
next;
Expand Down Expand Up @@ -8328,7 +8334,6 @@ sub Gedcom::Individual::as_string
} else {
$name = $self->name();

# See https://github.com/pjcj/Gedcom.pm/issues/28
$suffix = get_value({ person => $self, value => 'NAME NSFX' });
}

Expand Down

0 comments on commit 84ba4d6

Please sign in to comment.