]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: allow for missing In-Reply-To mapping
authorEric Wong <e@80x24.org>
Sun, 14 Aug 2016 10:21:12 +0000 (10:21 +0000)
committerEric Wong <e@80x24.org>
Sun, 14 Aug 2016 10:23:55 +0000 (10:23 +0000)
Because buggy mail clients exist and generate invalid
In-Reply-To headers we cannot handle across the board...

lib/PublicInbox/View.pm

index ed3c96e80d6ec5297abbae0d1c523e515a42963d..373545a2fadc181607d9946d9a5c10725f4e038c 100644 (file)
@@ -208,8 +208,8 @@ sub _th_index_lite {
        my $nr_s = 0;
        my $level = $map->[4];
        my $idx = $map->[3];
-       if (defined $irt) {
-               my $irt_map = $mapping->{$irt};
+       my $irt_map = $mapping->{$irt} if defined $irt;
+       if (defined $irt_map) {
                my $siblings = $irt_map->[0];
                $nr_s = scalar(@$siblings) - 1;
                $rv .= $pad . $irt_map->[1];