Don't "break" the variants by breaking early

Hope you enjoyed the pun, as this is an unfortunate bug to have
slipped into production.

While previously we breaked after finding the selected items
prior to I098e6921e8f7ef65dacacf09b9c25f70c945e58e we shouldn't do
that any more as we're using the same loop to iterate through and
generate our items!

Bug: T251521
Change-Id: I92c28e8fba684d7977dfd207ff939ac07a7a07af
This commit is contained in:
jdlrobson 2020-05-08 07:20:12 -07:00
parent 36f68d37d3
commit 01dbda42ca

View file

@ -477,7 +477,6 @@ class VectorTemplate extends BaseTemplate {
if ( $setLabelToSelected ) { if ( $setLabelToSelected ) {
if ( isset( $item['class'] ) && stripos( $item['class'], 'selected' ) !== false ) { if ( isset( $item['class'] ) && stripos( $item['class'], 'selected' ) !== false ) {
$props['label'] = $item['text']; $props['label'] = $item['text'];
break;
} }
} }
} }