ensure order date is non-null before formatting
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 27 Apr 2010 12:46:51 +0000 (12:46 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 27 Apr 2010 12:46:51 +0000 (12:46 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16318 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/acq/Lineitem.js

index 4bff2e9..3d9e674 100644 (file)
@@ -144,7 +144,9 @@ openils.acq.Lineitem.fetchAndRender = function(liId, args, callback) {
                 var orderDate = '';
                 if(po) {
                     var date = dojo.date.stamp.fromISOString(po.order_date());
-                    orderDate = dojo.date.locale.format(date, {selector:'date'});
+                    if(date) {
+                        orderDate = dojo.date.locale.format(date, {selector:'date'});
+                    }
                 }
 
                 var displayString = dojo.string.substitute(