From: Dobrica Pavlinusic Date: Wed, 27 Aug 2014 13:10:58 +0000 (+0200) Subject: don't display AF if there is nothing X-Git-Url: http://git.rot13.org/?p=Biblio-RFID.git;a=commitdiff_plain;h=392c5990b91553b8ccc244744cef5e51f8753018;ds=sidebyside don't display AF if there is nothing --- diff --git a/examples/selfcheck.js b/examples/selfcheck.js index 250c547..c57987e 100644 --- a/examples/selfcheck.js +++ b/examples/selfcheck.js @@ -203,7 +203,7 @@ function circulation( barcode, sid ) { pending_jsonp++; $.getJSON('/sip2/'+circulation_type+'/'+borrower_cardnumber+'/'+barcode+'/'+sid , function( data ) { console.info( circulation_type, data ); - $('ul#books').append('
  • ' + ( data['AJ'] || barcode ) + ' ' + data['AF'] + '
  • '); + $('ul#books').append('
  • ' + ( data['AJ'] || barcode ) + ( data['AF'] ? ' ' + data['AF'] + '' : '' ) + '
  • '); console.debug( book_barcodes ); pending_jsonp--; }).fail( function() {