]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/ContentHash.pm
www_stream: add trailing slash for help and color links
[public-inbox.git] / lib / PublicInbox / ContentHash.pm
index 1fe229559d2a584c6fc691e5851abde14f3ef59a..4dbe7b5049d57290f56d20e6f5a52d50612ed73b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2018-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # Unstable internal API.
@@ -68,10 +68,9 @@ sub content_digest ($) {
 
        # Only use Sender: if From is not present
        foreach my $h (qw(From Sender)) {
-               my @v = $eml->header($h);
-               if (@v) {
-                       digest_addr($dig, $h, $_) foreach @v;
-               }
+               my @v = $eml->header($h) or next;
+               digest_addr($dig, $h, $_) foreach @v;
+               last;
        }
        foreach my $h (qw(Subject Date)) {
                my @v = $eml->header($h);