[Pkg-javascript-commits] [sockjs-client] 155/350: Handle if jsonp callback has been cleanup up

tonnerre at ancient-solutions.com tonnerre at ancient-solutions.com
Fri Aug 5 01:03:57 UTC 2016


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.

commit 9a91ee683e3273466b77e03a4be20956eb5d6ade
Author: Bryce Kahle <bkahle at gmail.com>
Date:   Thu Oct 16 19:53:45 2014 -0400

    Handle if jsonp callback has been cleanup up
---
 tests/lib/receivers.js | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tests/lib/receivers.js b/tests/lib/receivers.js
index 2f223c5..3c7b62e 100644
--- a/tests/lib/receivers.js
+++ b/tests/lib/receivers.js
@@ -44,7 +44,9 @@ describe('Receivers', function () {
       JsonpReceiver.prototype._createScript = function () {
         var self = this;
         setTimeout(function () {
-          global[utils.WPrefix][self.id]('datadata');
+          if (global[utils.WPrefix][self.id]) {
+            global[utils.WPrefix][self.id]('datadata');
+          }
         }, 400);
       };
 
@@ -62,7 +64,9 @@ describe('Receivers', function () {
       JsonpReceiver.prototype._createScript = function () {
         var self = this;
         setTimeout(function () {
-          global[utils.WPrefix][self.id]('datadata');
+          if (global[utils.WPrefix][self.id]) {
+            global[utils.WPrefix][self.id]('datadata');
+          }
         }, 200);
       };
       var jpr = new JsonpReceiver('test');
@@ -123,7 +127,7 @@ describe('Receivers', function () {
       // simulate script error
       setTimeout(function () {
         jpr._scriptError();
-      }, 100);
+      }, 200);
     });
   });
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list