Bug 1859: Do not display <<>> if an entry without value is selected
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / letter.tt
index 8ed7a52..2af7a0e 100644 (file)
@@ -134,7 +134,7 @@ $(document).ready(function() {
 
             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() + ">>");
                     }
                 });