File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -483,7 +483,7 @@ sub format_address {
483483 # 12. clean again
484484 $text = $self -> _clean($text );
485485
486- # 13. set final components
486+ # 13. set final components (so we can get them later)
487487 $self -> {final_components } = $rh_components ;
488488
489489 # all done
@@ -937,9 +937,9 @@ sub _render_template {
937937 $output = $self -> _clean($output );
938938
939939 # is it empty?
940- # if yes and there is only one component then just use that one
941- if ( $output !~ m / \w / ) {
942- my @comps = sort keys %$components ;
940+ if ( length ( $output ) == 0){
941+ # if yes and there is only one component then just use that one
942+ my @comps = keys %$components ;
943943 if (scalar (@comps ) == 1) {
944944 foreach my $k (@comps ) {
945945 $output = $components -> {$k };
You can’t perform that action at this time.
0 commit comments