@@ -237,8 +237,7 @@ angularWidget('select', function(element){
237
237
// This is an array of array of existing option groups in DOM. We try to reuse these if possible
238
238
// optionGroupsCache[0] is the options with no option group
239
239
// optionGroupsCache[?][0] is the parent: either the SELECT or OPTGROUP element
240
- optionGroupsCache = [ [ { element : selectElement , label :'' } ] ] ,
241
- inChangeEvent ;
240
+ optionGroupsCache = [ [ { element : selectElement , label :'' } ] ] ;
242
241
243
242
// find existing special options
244
243
forEach ( selectElement . children ( ) , function ( option ) {
@@ -358,12 +357,12 @@ angularWidget('select', function(element){
358
357
359
358
if ( optionGroupsCache . length <= groupIndex ) {
360
359
// we need to grow the optionGroups
361
- optionGroupsCache . push (
362
- existingOptions = [ existingParent = {
363
- element : optGroupTemplate . clone ( ) . attr ( ' label' , optionGroupName ) ,
364
- label : optionGroup . label
365
- } ]
366
- ) ;
360
+ existingParent = {
361
+ element : optGroupTemplate . clone ( ) . attr ( 'label' , optionGroupName ) ,
362
+ label : optionGroup . label
363
+ } ;
364
+ existingOptions = [ existingParent ] ;
365
+ optionGroupsCache . push ( existingOptions ) ;
367
366
selectElement . append ( existingParent . element ) ;
368
367
} else {
369
368
existingOptions = optionGroupsCache [ groupIndex ] ;
0 commit comments