mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Merge pull request #814 from ultimatemember/fix/JS_endless_loop
JavaScript error in the members directory filter
This commit is contained in:
@@ -124,13 +124,14 @@ jQuery(document).ready(function() {
|
||||
function unselectEmptyOption( e ) {
|
||||
var $element = jQuery( e.currentTarget );
|
||||
var $selected = $element.find(':selected');
|
||||
|
||||
$selected.each( function ( i, option ) {
|
||||
if ( option.value === '' ) {
|
||||
option.selected = false;
|
||||
$element.trigger( 'change' );
|
||||
}
|
||||
});
|
||||
if ( $selected.length > 1 ) {
|
||||
$selected.each( function ( i, option ) {
|
||||
if ( option.value === '' ) {
|
||||
option.selected = false;
|
||||
$element.trigger( 'change' );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if ( typeof( jQuery.fn.select2 ) === 'function' ) {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user