diff --git a/lib/bcoin/ldb.js b/lib/bcoin/ldb.js index 8615bb67..83de5249 100644 --- a/lib/bcoin/ldb.js +++ b/lib/bcoin/ldb.js @@ -136,7 +136,7 @@ function LowlevelUp(file, options) { // Stay as close to the metal as possible. // We want to make calls to C++ directly. - while (this.db.db && this.db.db.put) + while (this.db.db && this.db.db.put && this.db.db !== this.db) this.db = this.db.db; this.binding = this.db;