Skip to content

Commit

Permalink
Use ->can
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jul 26, 2024
1 parent 9eb589b commit bbf9a6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -10596,7 +10596,7 @@ sub year
$string = $params{'record'};
return unless($string);

if(ref($string) eq 'Gedcom::Record') {
if(ref($string) && $string->can('date')) {
$string = $string->date();
return unless($string);
$string =~ s/\s+$//;
Expand Down

0 comments on commit bbf9a6f

Please sign in to comment.