File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 132
132
var o = this . options ;
133
133
var menu = this . menu ;
134
134
var checkboxContainer = this . checkboxContainer ;
135
- var optgroups = [ ] ;
135
+ var optgroups = { } ;
136
136
var html = "" ;
137
137
var id = el . attr ( 'id' ) || multiselectID ++ ; // unique ID for the label & option tags
138
138
164
164
optLabel = parent . getAttribute ( 'label' ) ;
165
165
166
166
// has this optgroup been added already?
167
- if ( $ . inArray ( optLabel , optgroups ) === - 1 ) {
167
+ if ( ! optgroups [ optLabel ] ) {
168
168
var optLabelEscaped = optLabel . replace ( / & / g, '&' )
169
169
. replace ( / > / g, '>' )
170
170
. replace ( / < / g, '<' )
171
171
. replace ( / ' / g, ''' )
172
172
. replace ( / \/ / g, '/' )
173
173
. replace ( / " / g, '"' ) ;
174
174
html += '<li class="ui-multiselect-optgroup-label ' + parent . className + '"><a href="#">' + optLabelEscaped + '</a></li>' ;
175
- optgroups . push ( optLabel ) ;
175
+ optgroups [ optLabel ] = true ;
176
176
}
177
177
}
178
178
You can’t perform that action at this time.
0 commit comments