We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
clear()
1 parent 2bb79fa commit 9878660Copy full SHA for 9878660
index.js
@@ -349,7 +349,7 @@ class MemoryLevel extends AbstractLevel {
349
}
350
351
async _clear (options) {
352
- if (options.limit === -1 && !Object.keys(options).some(isRangeOption)) {
+ if (options.limit === -1 && !Object.keys(options).some(isRangeOption) && !options.snapshot) {
353
// Delete everything by creating a new empty tree.
354
this[kTree] = createRBT(compare)
355
return
0 commit comments