Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
prevent keys on scalar error
Browse files Browse the repository at this point in the history
  • Loading branch information
moollaza committed Sep 21, 2016
1 parent 8b3b50c commit 4fe616f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/App/DuckPAN/Fathead.pm
Expand Up @@ -140,7 +140,7 @@ sub _build_structured_answer {
# Get IA Metadata via ID lookup
# Assume selected is an ID
my $metadata = DDG::Meta::Data->get_ia(id => $self->selected) // {};
$self->app->emit_error("No Metadata found for ID: ".$self->selected) unless keys $metadata;
$self->app->emit_error("No Metadata found for ID: ".$self->selected) unless keys %{$metadata};

# DBD::Csv ignores col_names letter casing
# So, manually map columns to template properties
Expand Down

0 comments on commit 4fe616f

Please sign in to comment.