webstaff: avoid showing 'null' as source label when displaying line item
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 7 Feb 2017 21:15:08 +0000 (16:15 -0500)
committerKathy Lussier <klussier@masslnc.org>
Sat, 18 Feb 2017 18:31:32 +0000 (13:31 -0500)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/acq/common/li_table.js

index 879ba81..7c1c311 100644 (file)
@@ -710,7 +710,8 @@ function AcqLiTable() {
         row.setAttribute('li', li.id());
         var tds = dojo.query('[attr]', row);
         dojo.forEach(tds, function(td) {self.setRowAttr(td, liWrapper, td.getAttribute('attr'), td.getAttribute('attr_type'));});
-        dojo.query('[name=source_label]', row)[0].appendChild(document.createTextNode(li.source_label()));
+        if (li.source_label() !== null)
+            dojo.query('[name=source_label]', row)[0].appendChild(document.createTextNode(li.source_label()));
 
         // so we can scroll to it later
         dojo.query('[name=bib-info-cell]', row)[0].id = 'li-title-ref-' + li.id();