diff options
Diffstat (limited to 'lib/WWW/FairViewer/Utils.pm')
-rw-r--r-- | lib/WWW/FairViewer/Utils.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/WWW/FairViewer/Utils.pm b/lib/WWW/FairViewer/Utils.pm index 4e614f8..5ca1106 100644 --- a/lib/WWW/FairViewer/Utils.pm +++ b/lib/WWW/FairViewer/Utils.pm @@ -224,8 +224,10 @@ sub has_entries { if (ref($result->{results}) eq 'HASH') { - if (exists $result->{results}{comments}) { - return scalar @{$result->{results}{comments}} > 0; + foreach my $type(qw(comments videos playlists)) { + if (exists $result->{results}{$type}) { + return scalar @{$result->{results}{$type}} > 0; + } } my $type = $result->{results}{type}//''; |