fix an edge case involving select-tiered empty label, #22800
authorMark Wells <mark@freeside.biz>
Sat, 27 Apr 2013 00:01:50 +0000 (17:01 -0700)
committerMark Wells <mark@freeside.biz>
Sat, 27 Apr 2013 00:01:50 +0000 (17:01 -0700)
httemplate/elements/select-tiered.html

index 3ff5471..48469dc 100644 (file)
@@ -174,6 +174,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;
 }