Paste number 143457: now stricter

Paste number 143457: now stricter
Pasted by: gmcharlt
When:4 years, 4 months ago
Share:Tweet this! | http://paste.lisp.org/+32OX
Channel:None
Paste contents:
Raw Source | XML | Display As
diff --git a/Open-ILS/xul/staff_client/server/patron/search_form.js b/Open-ILS/xul/staff_client/server/patron/search_form.js
index 5fadf55..e62efa0 100644
--- a/Open-ILS/xul/staff_client/server/patron/search_form.js
+++ b/Open-ILS/xul/staff_client/server/patron/search_form.js
@@ -19,7 +19,9 @@ patron.search_form.prototype = {
         // But we're going to let search_limit and search_sort be configurable now by those spawning this interface, and let's as
         // I'm going to place them into the "obj" scope for this instance.
         obj.search_limit = params.query.search_limit;
-        obj.search_sort = JSON2js( params.query.search_sort ); // Let's assume this is encoded as JSON
+        obj.search_sort = (typeof params.query.search_sort === 'undefined') ?
+                            null :
+                            JSON2js( params.query.search_sort ); // Let's assume this is encoded as JSON
 
         JSAN.use('OpenILS.data'); this.OpenILS = {}; 
         obj.OpenILS.data = new OpenILS.data(); obj.OpenILS.data.init({'via':'stash'});

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.