handle null as a return result for an empty list
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 22 Sep 2010 01:03:19 +0000 (01:03 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 22 Sep 2010 01:03:19 +0000 (01:03 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17881 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/holds.js

index 3486ced..72c4caa 100644 (file)
@@ -309,8 +309,10 @@ patron.holds.prototype = {
                                         params: [ses()],
                                     }
                                 );
-                                if (typeof robj.ilsevent != 'undefined') { throw(robj); }
-                                print.simple( robj.template_output().data() );
+                                if (robj != null) {
+                                    if (typeof robj.ilsevent != 'undefined') { throw(robj); }
+                                    print.simple( robj.template_output().data() );
+                                }
                             } catch(E) {
                                 obj.error.standard_unexpected_error_alert('cmd_holds_print_full',E);
                             }