Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Fix zero-length range options #156

Closed
3 tasks done
vweevers opened this issue Dec 25, 2018 · 0 comments
Closed
3 tasks done

Fix zero-length range options #156

vweevers opened this issue Dec 25, 2018 · 0 comments

Comments

@vweevers
Copy link
Member

vweevers commented Dec 25, 2018

See #155.

level-js/iterator.js

Lines 54 to 58 in 0b1507f

// Temporary workaround for Level/abstract-leveldown#318
if ((Buffer.isBuffer(lower) || typeof lower === 'string') && lower.length === 0) lower = undefined
if ((Buffer.isBuffer(upper) || typeof upper === 'string') && upper.length === 0) upper = undefined
if ((Buffer.isBuffer(lowerOpen) || typeof lowerOpen === 'string') && lowerOpen.length === 0) lowerOpen = undefined
if ((Buffer.isBuffer(upperOpen) || typeof upperOpen === 'string') && upperOpen.length === 0) upperOpen = undefined

  • Add custom tests, for zero-length strings and buffers, to start
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant