From 07759ac49abb843e80ec4327d48ee716c69c1979 Mon Sep 17 00:00:00 2001 From: Bluenix Date: Fri, 28 May 2021 19:26:01 +0200 Subject: [PATCH] Satisfy Prettier --- packages/pg-cursor/index.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/pg-cursor/index.js b/packages/pg-cursor/index.js index d8ca02cf2..edb38d381 100644 --- a/packages/pg-cursor/index.js +++ b/packages/pg-cursor/index.js @@ -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)