LP#1268619: websockets : api_level continued
authorBill Erickson <berick@esilibrary.com>
Wed, 5 Mar 2014 13:39:12 +0000 (08:39 -0500)
committerBill Erickson <berick@esilibrary.com>
Sun, 4 May 2014 20:10:35 +0000 (16:10 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
src/javascript/opensrf.js

index 6a36400..a387a9d 100644 (file)
@@ -92,7 +92,7 @@ osrfMessage.prototype.serialize = function() {
             'type' : this.hash.type,
             'payload' : (this.hash.payload) ? this.hash.payload.serialize() : 'null',
             'locale' : this.hash.locale,
-            'api_level' : this.hash.api_level || OpenSRF.api_level
+            'api_level' : this.hash.api_level;
         }
     };
 };
@@ -422,7 +422,7 @@ OpenSRF.Request = function(session, reqid, args) {
     this.method = args.method;
     this.params = args.params;
     this.timeout = args.timeout;
-    this.api_level = args.api_level;
+    this.api_level = args.api_level || OpenSRF.api_level;
     this.response_queue = [];
     this.complete = false;
 };