[Pkg-javascript-commits] [node-stream-http] 144/208: Fix arraybuffer for phantomjs

Bastien Roucariès rouca at moszumanska.debian.org
Sun Aug 13 13:39:37 UTC 2017


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

rouca pushed a commit to branch master
in repository node-stream-http.

commit 70b928bbb937f15fede3d28dd4a827ca95ce89b7
Author: John Hiesey <john at hiesey.com>
Date:   Thu Sep 8 14:35:22 2016 -0700

    Fix arraybuffer for phantomjs
    
    This should be an equivalent fix to #42
---
 lib/response.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/response.js b/lib/response.js
index b767318..d85947c 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -143,7 +143,7 @@ IncomingMessage.prototype._onXHRProgress = function () {
 			}
 			break
 		case 'arraybuffer':
-			if (xhr.readyState !== rStates.DONE)
+			if (xhr.readyState !== rStates.DONE || !xhr.response)
 				break
 			response = xhr.response
 			self.push(new Buffer(new Uint8Array(response)))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stream-http.git



More information about the Pkg-javascript-commits mailing list