Fix dump-style printing by ensuring 'params' is defined before accessing it
authordbwells <dbwells@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 19 Apr 2011 17:55:47 +0000 (17:55 +0000)
committerdbwells <dbwells@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 19 Apr 2011 17:55:47 +0000 (17:55 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20216 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/util/list.js

index fb46564..1edabec 100644 (file)
@@ -1276,8 +1276,8 @@ util.list.prototype = {
 
     'dump_csv_to_printer' : function(params) {
         var obj = this;
-        JSAN.use('util.print'); var print = new util.print(params.printer_context || obj.printer_context);
         if (typeof params == 'undefined') params = {};
+        JSAN.use('util.print'); var print = new util.print(params.printer_context || obj.printer_context);
         if (params.no_full_retrieve) {
             print.simple( obj.dump_csv( params ), {'content_type':'text/plain'} );
         } else {
@@ -1291,8 +1291,8 @@ util.list.prototype = {
 
     'dump_extended_format_to_printer' : function(params) {
         var obj = this;
-        JSAN.use('util.print'); var print = new util.print(params.printer_context || obj.printer_context);
         if (typeof params == 'undefined') params = {};
+        JSAN.use('util.print'); var print = new util.print(params.printer_context || obj.printer_context);
         if (params.no_full_retrieve) {
             print.simple( obj.dump_extended_format( params ), {'content_type':'text/plain'} );
         } else {