File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -1414,11 +1414,8 @@ var unbxdSearchInit = function(jQuery, Handlebars){
1414
1414
this . compiledSortContainerTemp = Handlebars . compile ( this . options . sortContainerTemp ) ;
1415
1415
1416
1416
var sortOptions = this . options . sortOptions . map ( function ( opt ) {
1417
- if ( Object . keys ( this . params . sort ) . length > 0 ) {
1418
- opt [ 'selected' ] = ( opt . hasOwnProperty ( 'field' ) && opt . field in this . params . sort && this . params . sort [ opt . field ] === opt . order ) ? true : false ;
1419
- } else {
1420
- opt [ 'selected' ] = opt [ 'selected' ] || false ;
1421
- }
1417
+ opt [ 'selected' ] = ( opt . hasOwnProperty ( 'field' ) && opt . field in this . params . sort && this . params . sort [ opt . field ] === opt . order ) ?
1418
+ true : ( ! opt . hasOwnProperty ( 'field' ) && Object . keys ( this . params . sort ) . length === 0 ) ? true : false ;
1422
1419
return opt ;
1423
1420
} . bind ( this ) ) ;
1424
1421
You can’t perform that action at this time.
0 commit comments