We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ffd5762 commit dabeb9bCopy full SHA for dabeb9b
packages/pg-cursor/index.js
@@ -244,16 +244,14 @@ Cursor.prototype.close = function (cb) {
244
cb = (err, rows) => (err ? reject(err) : resolve(rows))
245
})
246
}
247
+
248
if (this.state === 'idle' || this.state === 'submitted') {
249
this._getRows(rows, cb)
- }
250
- else if (this.state === 'busy' || this.state === 'initialized') {
+ } else if (this.state === 'busy' || this.state === 'initialized') {
251
this._queue.push([rows, cb])
252
253
- else if (this.state === 'error') {
+ } else if (this.state === 'error') {
254
setImmediate(() => cb(this._error))
255
256
- else if (this.state === 'done') {
+ } else if (this.state === 'done') {
257
setImmediate(() => cb(null, []))
258
} else {
259
throw new Error('Unknown state: ' + this.state)
0 commit comments