From b297876c2bc7afafa94ce5219325e50dc5aa20ae Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 15 Sep 2022 06:08:39 -0700 Subject: [PATCH] simplifiy --- lib/Perl/Tidy/Formatter.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 6c82ede7..2cad4132 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -9165,9 +9165,7 @@ sub weld_nested_containers { # RULE: do not weld to a square bracket which does not contain commas if ( $inner_opening->[_TYPE_] eq '[' ) { my $rtype_count = $self->[_rtype_count_by_seqno_]->{$inner_seqno}; - next unless ($rtype_count); - my $comma_count = $rtype_count->{','}; - next unless ($comma_count); + next unless ( $rtype_count && $rtype_count->{','} ); # Do not weld if there is text before a '[' such as here: # curr_opt ( @beg [2,5] ) -- 2.39.5