Skip to content

Commit 84d512e

Browse files
committed
query.stream()._read without connection is a no-op
Fixes errors when `.stream()` is called on a query without a connection (e.g. a query created using `createQuery`).
1 parent 680a5f9 commit 84d512e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/protocol/sequences/Query.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Query.prototype.stream = function(options) {
193193
stream = new Readable(options);
194194

195195
stream._read = function() {
196-
self._connection.resume();
196+
self._connection && self._connection.resume();
197197
};
198198

199199
this.on('result',function(row,i) {

0 commit comments

Comments
 (0)