File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 221221 this . disable ( ) ;
222222 }
223223
224- this . $select . wrap ( '<span class="multiselect-native-select" />' ) . after ( this . $container ) ;
224+ // Only wrap the select in a multiselect span if it is not already contained.
225+ const wrapperClass = "multiselect-native-select" ;
226+ if ( this . $select . parent ( ) . first ( ) . attr ( "class" ) !== wrapperClass ) {
227+ this . $select . wrap ( `<span class="${ wrapperClass } " />` ) ;
228+ }
229+ // Container is removed in the .destroy(), so always insert it.
230+ this . $select . after ( this . $container ) ;
225231 this . options . onInitialized ( this . $select , this . $container ) ;
226232 }
227233
Original file line number Diff line number Diff line change 11{
22 "name" : " bootstrap-multiselect" ,
3- "version" : " 0.10.01 " ,
3+ "version" : " 0.10.02 " ,
44 "description" : " JQuery multiselect plugin based on Twitter Bootstrap." ,
55 "main" : " dist/js/bootstrap-multiselect.js" ,
66 "directories" : {
You can’t perform that action at this time.
0 commit comments