diff options
Diffstat (limited to 'lib/PublicInbox/SearchThread.pm')
-rw-r--r-- | lib/PublicInbox/SearchThread.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/SearchThread.pm b/lib/PublicInbox/SearchThread.pm index 1d250b46..450a06f4 100644 --- a/lib/PublicInbox/SearchThread.pm +++ b/lib/PublicInbox/SearchThread.pm @@ -76,7 +76,9 @@ sub _add_message ($$) { # C. Set the parent of this message to be the last element in # References. - $prev->add_child($this) if defined $prev; + if (defined $prev && !$this->has_descendent($prev)) { # would loop + $prev->add_child($this); + } } package PublicInbox::SearchThread::Msg; |