File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2276,7 +2276,7 @@ the specific language governing permissions and limitations under the Apache Lic
22762276 if ( initial === true && selected >= 0 ) {
22772277 // By default, the selected item is displayed inside the result list from a single select
22782278 // User can provide an implementation for 'hideSelectionFromResult' and hide it
2279- if ( this . opts . hideSelectionFromResult !== undefined && selectedElm !== null ) {
2279+ if ( selectedElm !== null ) {
22802280 if ( this . opts . hideSelectionFromResult ( selectedElm ) )
22812281 selectedElm . addClass ( "select2-selected" ) ;
22822282 }
@@ -3008,7 +3008,7 @@ the specific language governing permissions and limitations under the Apache Lic
30083008 // By default, the selected item is hidden from the result list inside a multi select
30093009 // User can provide an implementation for 'hideSelectionFromResult' and allow the same
30103010 // element to be selected multiple times.
3011- if ( self . opts . hideSelectionFromResult === undefined || self . opts . hideSelectionFromResult ( choice ) ) {
3011+ if ( self . opts . hideSelectionFromResult ( choice ) === undefined || self . opts . hideSelectionFromResult ( choice ) ) {
30123012 choice . addClass ( "select2-selected" ) ;
30133013 // mark all children of the selected parent as selected
30143014 choice . find ( ".select2-result-selectable" ) . addClass ( "select2-selected" ) ;
You can’t perform that action at this time.
0 commit comments