prevent infinite loop on circular references.

This commit is contained in:
Christopher Jeffrey 2016-04-03 03:32:27 -07:00
parent c3e45a2a53
commit b26961d68a

View File

@ -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;