Skip to content

Commit

Permalink
Satisfy Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluenix2 committed May 28, 2021
1 parent e800f45 commit 07759ac
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/pg-cursor/index.js
Expand Up @@ -226,16 +226,14 @@ class Cursor extends EventEmitter {
cb = (err, rows) => (err ? reject(err) : resolve(rows))
})
}

if (this.state === 'idle' || this.state === 'submitted') {
this._getRows(rows, cb)
}
else if (this.state === 'busy' || this.state === 'initialized') {
} else if (this.state === 'busy' || this.state === 'initialized') {
this._queue.push([rows, cb])
}
else if (this.state === 'error') {
} else if (this.state === 'error') {
setImmediate(() => cb(this._error))
}
else if (this.state === 'done') {
} else if (this.state === 'done') {
setImmediate(() => cb(null, []))
} else {
throw new Error('Unknown state: ' + this.state)
Expand Down

0 comments on commit 07759ac

Please sign in to comment.