now returns null if there is no data from the server instead of an empty array
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 20 Jan 2006 20:25:04 +0000 (20:25 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 20 Jan 2006 20:25:04 +0000 (20:25 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2773 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/RemoteRequest.js

index 2cd8288..e02b6b7 100644 (file)
@@ -210,6 +210,7 @@ RemoteRequest.prototype.getResultObject = function() {
        }
 
        var payload = obj.payload;
+       if(!payload || payload.length == 0) return null;
        payload = (payload.length == 1) ? payload[0] : payload;
 
        if(payload.__isfieldmapper && payload.classname == "perm_ex") {