fix an edge case involving select-tiered empty label, #22800
authorMark Wells <mark@freeside.biz>
Fri, 26 Apr 2013 23:58:29 +0000 (16:58 -0700)
committerMark Wells <mark@freeside.biz>
Fri, 26 Apr 2013 23:58:29 +0000 (16:58 -0700)
httemplate/elements/select-tiered.html

index e332eef..51ec438 100644 (file)
@@ -181,6 +181,8 @@ for( $i = 0; $i < @$tiers; $i++ ) {
         $children_of{$key}->{''} = $tier->{empty_label};
       }
     }
+    # ensure that there's always at least one empty label
+    $children_of{''}->{''} = $tier->{empty_label};
   }
   $tier->{by_key} = \%children_of;
 }