From 7e2f017fdde71d74ef29a43e9ee966daba42b2f4 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 10 Sep 2022 08:17:10 +0000 Subject: view: _th_index_lite: use `//' defined-or op Just something I noticed while evaluating this subroutine for the buffering overhaul. --- lib/PublicInbox/View.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/PublicInbox/View.pm') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 3282d4f9..08ba54bb 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -302,8 +302,7 @@ sub _th_index_lite { my $rv = ''; my $mapping = $ctx->{mapping} or return $rv; my $pad = ' '; - my $mid_map = $mapping->{$mid_raw}; - defined $mid_map or + my $mid_map = $mapping->{$mid_raw} // return 'public-inbox BUG: '.ascii_html($mid_raw).' not mapped'; my ($attr, $node, $idx, $level) = @$mid_map; my $children = $node->{children}; -- cgit v1.2.3-24-ge0c7