if($(myListBox).find('option').length > 0) {
$(myListBox).find('option').each( function (){
- if ( $(this).attr('selected') ) {
+ if ( $(this).attr('selected') && $(this).val().length > 0 ) {
$(myQuery).insertAtCaret("<<" + $(this).val() + ">>");
}
});