Escape IA if no parent_era has been found
parent
b81101f1e3
commit
4774611756
|
@ -31,6 +31,9 @@ handle query_parts => sub {
|
|||
my $era_year = $3;
|
||||
|
||||
my $parent_era = $year_map_with_aliases{$era_name};
|
||||
|
||||
return unless $parent_era;
|
||||
|
||||
my $era_hash = $year_definitions->{$parent_era};
|
||||
|
||||
my $gregorian_year_started = $era_hash->{'gregorian_year_started'};
|
||||
|
|
|
@ -78,7 +78,8 @@ ddg_goodie_test(
|
|||
'meiji 2 45645' => test_zci(
|
||||
'Meiji 2 is equivalent to 1869 AD in the Gregorian Calendar',
|
||||
make_structured_answer('Meiji', '2', '1869', 'AD')
|
||||
)
|
||||
),
|
||||
'bengali calendar 423' => undef
|
||||
);
|
||||
|
||||
sub make_structured_answer {
|
||||
|
|
Loading…
Reference in New Issue