George S. Baugh hace 5 años
padre
commit
67d539c7f7
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/Trog/Data/DUMMY.pm

+ 1 - 1
lib/Trog/Data/DUMMY.pm

@@ -149,8 +149,8 @@ sub _dedup_versions ($version=-1, @posts) {
     my @uniqids = List::Util::uniq(map { $_->{id} } @posts);
     my %posts_deduped;
     for my $id (@uniqids) {
-        my $version_max = List::Util::max(map { $_->{version } } @posts);
         my @ofid = sort { $b->{version} cmp $a->{version} } grep { $_->{id} eq $id } @posts;
+        my $version_max = List::Util::max(map { $_->{version } } @ofid);
         $posts_deduped{$id} = $ofid[0];
         $posts_deduped{$id}{version_max} = $version_max;
     }