diff --git a/index.js b/index.js index 1387fba..332d930 100644 --- a/index.js +++ b/index.js @@ -349,7 +349,7 @@ class MemoryLevel extends AbstractLevel { } async _clear (options) { - if (options.limit === -1 && !Object.keys(options).some(isRangeOption)) { + if (options.limit === -1 && !Object.keys(options).some(isRangeOption) && !options.snapshot) { // Delete everything by creating a new empty tree. this[kTree] = createRBT(compare) return