From e98fc7f14b90b311ee7cf00d99ee4b81484a1dfe Mon Sep 17 00:00:00 2001 From: Lars-Magnus Skog Date: Tue, 29 Aug 2017 16:03:27 +0200 Subject: [PATCH] fix failing tests --- lib/levelup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/levelup.js b/lib/levelup.js index 1a20326e..5158f52e 100644 --- a/lib/levelup.js +++ b/lib/levelup.js @@ -283,7 +283,7 @@ function getOptions (options) { function maybeError (db, callback) { if (!db._isOpening() && !db.isOpen()) { - callback(new ReadError('Database is not open')) + process.nextTick(callback, new ReadError('Database is not open')) return true } }