hypercore-storage 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/view.js +3 -2
- package/package.json +1 -1
package/lib/view.js
CHANGED
|
@@ -236,11 +236,12 @@ class View {
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
async _readAndMaybeDrop (read, key) {
|
|
239
|
+
const cleared = this.cleared // in case its cleared
|
|
239
240
|
const value = await read.get(key)
|
|
240
241
|
if (value === null) return null
|
|
241
242
|
|
|
242
|
-
for (let i = 0; i <
|
|
243
|
-
const c =
|
|
243
|
+
for (let i = 0; i < cleared.length; i++) {
|
|
244
|
+
const c = cleared[i]
|
|
244
245
|
// check if in range
|
|
245
246
|
if (b4a.compare(c[0], key) <= 0 && b4a.compare(key, c[2]) < 0) return null
|
|
246
247
|
}
|