Skip to content

Commit 9878660

Browse files
committed
Fix clear()
1 parent 2bb79fa commit 9878660

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ class MemoryLevel extends AbstractLevel {
349349
}
350350

351351
async _clear (options) {
352-
if (options.limit === -1 && !Object.keys(options).some(isRangeOption)) {
352+
if (options.limit === -1 && !Object.keys(options).some(isRangeOption) && !options.snapshot) {
353353
// Delete everything by creating a new empty tree.
354354
this[kTree] = createRBT(compare)
355355
return

0 commit comments

Comments
 (0)