[open-ils-commits] r20218 - branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util (dbwells)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Apr 19 13:56:53 EDT 2011


Author: dbwells
Date: 2011-04-19 13:56:49 -0400 (Tue, 19 Apr 2011)
New Revision: 20218

Modified:
   branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/list.js
Log:
Fix dump-style printing by ensuring 'params' is defined before accessing it


Modified: branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/list.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/list.js	2011-04-19 17:56:19 UTC (rev 20217)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/list.js	2011-04-19 17:56:49 UTC (rev 20218)
@@ -1275,8 +1275,8 @@
 
     'dump_csv_to_printer' : function(params) {
         var obj = this;
+        if (typeof params == 'undefined') params = {};
         JSAN.use('util.print'); var print = new util.print(params.printer_context || obj.printer_context);
-        if (typeof params == 'undefined') params = {};
         if (params.no_full_retrieve) {
             print.simple( obj.dump_csv( params ), {'content_type':'text/plain'} );
         } else {
@@ -1290,8 +1290,8 @@
 
     'dump_extended_format_to_printer' : function(params) {
         var obj = this;
+        if (typeof params == 'undefined') params = {};
         JSAN.use('util.print'); var print = new util.print(params.printer_context || obj.printer_context);
-        if (typeof params == 'undefined') params = {};
         if (params.no_full_retrieve) {
             print.simple( obj.dump_extended_format( params ), {'content_type':'text/plain'} );
         } else {



More information about the open-ils-commits mailing list