about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiSearch.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/LeiSearch.pm')
-rw-r--r--lib/PublicInbox/LeiSearch.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/PublicInbox/LeiSearch.pm b/lib/PublicInbox/LeiSearch.pm
index b09d1e45..d0963e92 100644
--- a/lib/PublicInbox/LeiSearch.pm
+++ b/lib/PublicInbox/LeiSearch.pm
@@ -133,9 +133,11 @@ sub xoids_for {
 # returns true if $eml is indexed by lei/store and keywords don't match
 sub kw_changed {
         my ($self, $eml, $new_kw_sorted, $docids) = @_;
-        my $xoids = xoids_for($self, $eml) // return;
-        $docids //= [];
-        @$docids = sort { $a <=> $b } values %$xoids;
+        if ($eml) {
+                my $xoids = xoids_for($self, $eml) // return;
+                $docids //= [];
+                @$docids = sort { $a <=> $b } values %$xoids;
+        }
         my $cur_kw = msg_keywords($self, $docids->[0]);
 
         # RFC 5550 sec 5.9 on the $Forwarded keyword states: