subtitle handling, prettified dates. bugfixes and better errors
[scpubgit/SCS.git] / lib / SCSite / LatestPageSet.pm
index dbeca56..c8fd13f 100644 (file)
@@ -11,7 +11,7 @@ sub flatten {
     $b->created cmp $a->created
   } $self->_parent->flatten;
   my $max = $self->_max_entries||0;
-  @sorted > $max ? @sorted[0..$max-1] : @sorted;
+  $max && @sorted > $max ? @sorted[0..$max-1] : @sorted;
 }
 
 sub map {