[Pkg-javascript-commits] [sockjs-client] 402/434: Fix #61 - catch all was two lines too wide, whoops

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:28 UTC 2014


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

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

commit aa546970d253f5c8405b192041534fdf031c5181
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Tue Apr 24 14:02:23 2012 +0100

    Fix #61 - catch all was two lines too wide, whoops
---
 lib/dom2.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/dom2.js b/lib/dom2.js
index c4262b1..27bd3a2 100644
--- a/lib/dom2.js
+++ b/lib/dom2.js
@@ -59,11 +59,11 @@ AbstractXHRObject.prototype._start = function(method, url, payload, opts) {
                 try {
                     var status = x.status;
                     var text = x.responseText;
-                    // IE does return readystate == 3 for 404 answers.
-                    if (text.length > 0) {
-                        that.emit('chunk', status, text);
-                    }
                 } catch (x) {};
+                // IE does return readystate == 3 for 404 answers.
+                if (text && text.length > 0) {
+                    that.emit('chunk', status, text);
+                }
                 break;
             case 4:
                 that.emit('finish', x.status, x.responseText);

-- 
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