We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e800f45 commit 07759acCopy full SHA for 07759ac
packages/pg-cursor/index.js
@@ -226,16 +226,14 @@ class Cursor extends EventEmitter {
226
cb = (err, rows) => (err ? reject(err) : resolve(rows))
227
})
228
}
229
+
230
if (this.state === 'idle' || this.state === 'submitted') {
231
this._getRows(rows, cb)
- }
232
- else if (this.state === 'busy' || this.state === 'initialized') {
+ } else if (this.state === 'busy' || this.state === 'initialized') {
233
this._queue.push([rows, cb])
234
235
- else if (this.state === 'error') {
+ } else if (this.state === 'error') {
236
setImmediate(() => cb(this._error))
237
238
- else if (this.state === 'done') {
+ } else if (this.state === 'done') {
239
setImmediate(() => cb(null, []))
240
} else {
241
throw new Error('Unknown state: ' + this.state)
0 commit comments